Write a program to sum values of given array.
Answer / Sandhya Yadav
In JavaScript, you can use the reduce() method to add all elements in an array. Example: const arr = [1, 2, 3]; console.log(arr.reduce((accumulator, currentValue) => accumulator + currentValue));
| Is This Answer Correct ? | 0 Yes | 0 No |
What is complexity of quicksort?
How do you do a mergesort?
Write a code for dynamic allocation of array.
Why do we need algorithm?
How do you reference all the elements in a one-dimension array?
Describe full binary tree and complete binary tree.
How do you sort an array by value?
Tell me how to find middle element of linked list in one pass?
How many links are there in a binary tree of N nodes?
Explain the term recursive case?
Who invented data structure?
Write a Program for Reverse a linked list.