What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-01 19:40:04
add each element in an array java
import java.util.Arrays; import java.util.Scanner; public class SumOfElementsOfAnArray { public static void main(String args[]){ System.out.println("Enter the required size of the array :: "); &nbs... Add solution -
VBA 2022-03-01 09:15:10
excel vba check for uninitialized or empty array
'In VBA an un-itialized dynamic array will raise a run-time error if 'code attempts to read from... or write to it. 'VBA function to test if an array is ready for access: Function ArrayReady(a) As Boolean On Error Resume Next ArrayReady = Not LB... Add solution -
Javascript 2022-02-26 18:35:07
js max array
// For large data, it's better to use reduce. Supose arr has a large data in this case: const arr = [1, 5, 3, 5, 2]; const max = arr.reduce((a, b) => { return Math.max(a, b) }); // For arrays with relatively few elements you can use apply: const max ... Add solution -
TypeScript 2022-02-25 03:20:10
How to loop through objects in java using streams
ArrayList<String> namesList = new ArrayList<String>(Arrays.asList( "alex", "brian", "charles") ); namesList.forEach(name -> System.out.println(name)); Add solution -
Javascript 2022-02-24 15:50:02
maximum element in an array javascript
// For large data, it's better to use reduce. Supose arr has a large data in this case: const arr = [1, 5, 3, 5, 2]; const max = arr.reduce((a, b) => { return Math.max(a, b) }); // For arrays with relatively few elements you can use apply: const max ... Add solution -
-
Other 2022-02-19 20:10:04
what is the use of sentinels in merge sort
The use of sentinels in merge sort prevents us from needing to check to see if we have reached the end of either of the arrays being sorted. Merge sort can be performed without a sentinel, but an implementation of merge sort without a sentinel adds an add... Add solution