You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Equilibrium index of an array is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes. For example, in an arrya A:
* Check if array elements are consecutive | Added Method 3
108
-
Given an unsorted array of numbers, write a function that returns true if array consists of consecutive numbers.
109
-
110
-
Examples:
111
-
a) If array is {5, 2, 3, 1, 4}, then the function should return true because the array has consecutive numbers from 1 to 5.
112
-
113
-
b) If array is {83, 78, 80, 81, 79, 82}, then the function should return true because the array has consecutive numbers from 78 to 83.
114
-
115
-
c) If the array is {34, 23, 52, 12, 3 }, then the function should return false because the elements are not consecutive.
116
-
117
111
118
112
* Find the smallest missing number
119
113
Given a sorted array of n integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array.
0 commit comments