Category: Array

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...

0

Remove duplicates from the given array

Problem description : Write a function that removes duplicates entries from a given array. Input : An Array // [‘Heart5’, ‘Diamond6’, ‘Club7’, ‘Spade8’, ‘Diamond6’, ‘Club7’] Output : An Array // [‘Heart5’, ‘Diamond6’, ‘Club7’, ‘Spade8’]...

Show Buttons
Hide Buttons