Author: Kavit

0

Merge Two Sorted Linked Lists in Javascript

Problem : Given list l1 = 1->2->3. And list l2 = 10->20->30. Generate a new list mergedList = 1->2->3->10->20->30. Given list l1 = 1->3->4. And list l2 = 1->2->3. Generate a new list mergedList...

Programming shorthands / tricks 0

Programming shorthands / tricks

  Different ways to track the max value while iterating over different values We can use if, ternary operator or Math.max function as shown below. if (val > max) {   max = val...

0

Currying in javascript

Problem Implement the compound function which returns a function and satisfies the following condition function add10 (a) { return a + 10 } console.log(add10(10)) // 20 console.log(compound(add10)(10)) // 30 Understanding closures, currying, partially applied...

Show Buttons
Hide Buttons