stcs
Classified in Computers
Written at on English with a size of 1.62 KB.
What is an array? - An Array is an ordered collection of items.
What is the following
Array - int[] arr = new int[3]; - One-dimensional array
What is the output of the following Java program? - No output and there is an error when the program is
Compiled.
if ((i != j) && (a[i] == a[j])) – -1 when lonely false, works
if (a[i] == a[j]) { - always returns -1 (fails)
if break removed, run slower
2 3 return x + secretMethod(x, n - 1); - 4
2 3 return x * secretMethod(x, n - 1); - 0
4 return x * secretMethod(x - 2); - 8
insertion sort, but bubbles all prev for each element
Selection sort – find next smallest and swap into n element. N+1.
Radix sort – buckets. Start with LSB.
5 7 System.Out.println(node.Next.NodeValue); 7
5 7 System.Out.Println(node.NodeValue); 5
5 7 LLNode node = new LLNode(5); 5