mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
Refactor Code Style (#4151)
This commit is contained in:
@ -11,7 +11,7 @@ public class LongestIncreasingSubsequence {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int n = sc.nextInt();
|
||||
|
||||
int arr[] = new int[n];
|
||||
int[] arr = new int[n];
|
||||
for (int i = 0; i < n; i++) {
|
||||
arr[i] = sc.nextInt();
|
||||
}
|
||||
@ -70,9 +70,9 @@ public class LongestIncreasingSubsequence {
|
||||
* @author Alon Firestein (https://github.com/alonfirestein)
|
||||
*/
|
||||
// A function for finding the length of the LIS algorithm in O(nlogn) complexity.
|
||||
public static int findLISLen(int a[]) {
|
||||
public static int findLISLen(int[] a) {
|
||||
int size = a.length;
|
||||
int arr[] = new int[size];
|
||||
int[] arr = new int[size];
|
||||
arr[0] = a[0];
|
||||
int lis = 1;
|
||||
for (int i = 1; i < size; i++) {
|
||||
|
Reference in New Issue
Block a user