If we do arraylist lst = new arraylist(); what is the initial capacity of the arraylist lst ?
Answers
Answered by
0
Answer:
ArrayList in Java can be seen as similar to vector in C++. java-arraylist ... ArrayList(): This constructor is used to build an empty array list ... for ( int i= 0 ; i<arrli.size(); i ++).
Answered by
1
Answer:
Number of subarrays having sum exactly equal to k. Given an unsorted array of integers, find the number of subarrays having sum exactly equal to a given number k. Examples: Input : arr[] = {10, 2, -2, -20, 10}, k = -10 Output : 3 Subarrays: arr[0..
Similar questions