Some mental challenges to practice my coding skills using javascript. If you want to practice, delete the function(s) under test and pass each test.
npm install
npx jest --watchAll
- findingMissingIndices.spec.js - Given a complete and incomplete array, find the missing values
- findingDuplicateIndices.spec.js - Find the duplicate number on a given integer array
- findLargestSmallest.spec.js - Find the largest and smallest number in an unsorted integer array
- sumOfParts.spec.js - Find all pairs of an integer array whose sum is equal to a given number
- findFirstNonRepeatingCharacter.spec.js - Find first non-repeating character in a string
- quickSort.spec.js - Integer array sorted in place using the quicksort algorithm (Assuming correct input)
- removeDuplicatesInPlace.spec.js - Remove duplicates from an array in place
- reverseArray.spec.js - Reverse an array in place
- findMiddle.spec.js - Find the middle element of a singly linked list in one pass
- checkForCycle.spec.js - Check if a given linked list contains a cycle
- reverseLinkedList.spec.js - Reverse a singly linked list without recursion
- removeDuplicateNodes.spec.js - Remove duplicate nodes in an unsorted linked list
- findNthNodeFromEnd.spec.js - Find Nth Node from the end of a singly linked list
- addTwoNumbers.spec.js - Add two numbers represented by linked lists