Tagged: Array

Netflix 0

Implement zip in javascript

Reducing an array to a single value When we need to combine two arrays by progressively taking an item from each and combining the pair. If you visualize a zipper, where each side is...

0

Dedupe an array in javascript

Input : An array Output : An array Logic : Iterate over the input array called data Add the element to the output array called result if the element does not exist in the...

0

Generate all combinations of an array

  Input : [ 1, 2, 3 ]   Output : [  ‘ ‘,  1,  2,  12,  3,  13,  23,  123  ]   Logic : There are 2^n possible combinations for the array of...

Show Buttons
Hide Buttons