A comprehensive collection of algorithm solutions and data structure implementations for technical interview preparation. This repository contains solutions from multiple platforms including LeetCode, AlgoExpert, CodeWars, and NeetCode, organized by difficulty and topic.
- Total Problems Solved: 100+ algorithms
- Platforms: LeetCode, AlgoExpert, CodeWars, NeetCode
- Languages: JavaScript (primary), Python
- Test Coverage: Comprehensive test suite with Jest
- Categories: Arrays, Strings, Linked Lists, Trees, Sorting, Searching, Dynamic Programming, and more
algos/
├── algoExpert/ # AlgoExpert problems (24 problems)
├── leetcode/ # LeetCode problems (50+ problems)
├── codewars/ # CodeWars challenges (20+ problems)
├── neetcode/ # NeetCode problems (10+ problems)
├── binarySearch/ # Binary search specific problems
├── recursion/ # Recursion practice and visualizations
├── primeAlgos/ # Prime number algorithms
├── tests/ # Test files for each category
└── coverage/ # Test coverage reports
- Node.js (v14 or higher)
- npm or yarn
git clone https://github.com/derin23/algoPractice.git
cd algoPractice
npm install# Run all tests
npm test
# Run tests with coverage
npm run testAdvanced algorithm problems with detailed explanations and multiple solution approaches.
Key Problems:
twoNumberSum.js- Two Sum problem with O(n) and O(n log n) solutionsmergeSort.js- Merge sort implementation with O(n log n) complexityfindClosestValInBST.js- Binary search tree operationslinkedListConstruction.js- Complete linked list implementationminMaxStackConstruction.js- Stack with min/max trackingbranchSums.js- Binary tree branch sum calculationcaesarCipherEncryptor.js- String manipulation and encryptioncommonCharacters.js- Character frequency analysisfirstNonRepeatingCharacter.js- Hash map optimizationnodeDepths.js- Tree traversal and depth calculationnonConstructibleChange.js- Greedy algorithm approachnthFibonacci.js- Dynamic programming and memoizationpalindromCheck.js- String palindrome validationproductSum.js- Nested array processingremoveDuplicatesFromLinkedList.js- Linked list manipulationremoveKthNodeFromEnd.js- Two-pointer techniquesmallestDifference.js- Array comparison algorithmssortedSquaredArray.js- Array transformationtournamentWinner.js- Hash map and data processingvalidSubsequence.js- Sequence validation
Comprehensive collection of LeetCode problems covering all difficulty levels.
Easy Problems:
twoSum.js- Two Sum (multiple implementations)validAnagram.js- Anagram detectioncontainsDuplicate.js- Duplicate detectionfirstUniqueCharInStr.js- Character frequencyromanToInteger.js- Roman numeral conversionclosestToZero.js- Array processinglengthOfLastWord.js- String manipulationplusOne.js- Array arithmeticsingleNumber.js- Bit manipulationpowerOfThree.js- Mathematical optimization
Medium Problems:
longestSubstringWithoutRepeatingCharacters.js- Sliding windowlongestCommonPrefix.js- String comparisonmergeTwoSortedLists.js- Linked list merginggenerateParentheses.js- Backtrackingpermutations.js- Recursive generationdailyTemp.js- Stack-based solutionbinaryTreePreorderTraversal.js- Tree traversalsearchInsertPosition.js- Binary searchremoveDuplicatesFromSortedArr.js- Array manipulation
Advanced Problems:
binarySearch.js- Binary search implementationfirstBadVersion.js- Binary search variantmergeSortedArray.js- In-place mergingminStack.js- Stack with auxiliary data structurevalidParentheses.js- Stack-based validationbackspaceStringCompare.js- String processing with stack
Kata challenges focusing on practical programming skills and code optimization.
String Manipulation:
anagramDetection.js- Anagram checkingbreakCamelCase.js- String formattingconvertStringToCamelCase.js- Case conversionreverseString.js- String reversalsimplePigLatin.js- Pig Latin conversionstringEndsWith.js- String suffix checkingvowelCount.js- Character counting
Array Processing:
arrayDiff.js- Array difference calculationarrayInArray.js- Nested array handlingarrayPrototypeReverse.js- Array prototype extensiondescendingOrder.js- Array sortinglistFiltering.js- Array filteringmovingZerosToTheEnd.js- Array reordering
Data Structures:
getNthLL.js- Linked list operationsdictionaryFromTwoLists.js- Object creation from arrays
Advanced:
extractTheDomainNameFromAURL.js- URL parsingsplitStrings.js- String splitting algorithmsswitcheroo.js- Character swappingyourOrderPlease.js- String sorting by numbers
Curated problems following the NeetCode learning path for systematic interview preparation.
Core Problems:
twoSum.js- Two Sum implementationvalidAnagram.js- Anagram validationlongestCommonPrefix.js- Common prefix findingisSubsequence.js- Subsequence validationduplicateInteger.js- Duplicate detectionsumOfTwoNumbers.js- Basic arithmeticconcatenationOfArray.js- Array concatenationlengthOfLastWord.js- String processingreplaceElementsWithGreatest.js- Array transformationmySum.js- Custom sum implementation
Each problem category includes comprehensive test suites:
# Run specific test suites
npm test algoExpert/
npm test leetcode/
npm test codewars/
npm test neetcode/Test files follow the naming convention: [problemName].test.js
Most solutions include detailed complexity analysis:
- Time Complexity: O(n), O(n log n), O(n²), etc.
- Space Complexity: O(1), O(n), O(log n), etc.
- Approach: Brute force, optimized, multiple solutions
- Start with NeetCode problems
- Move to CodeWars for practical skills
- Progress to LeetCode Easy problems
- Advance to AlgoExpert fundamentals
- Focus on LeetCode Medium problems
- Practice AlgoExpert advanced problems
- Master CodeWars optimization challenges
- Tackle LeetCode Hard problems
- Implement complex AlgoExpert algorithms
- Focus on system design and optimization
- Testing: Jest with coverage reporting
- Linting: ESLint (if configured)
- Version Control: Git with organized commits
- Documentation: Comprehensive README and inline comments
- Each solution includes multiple approaches when applicable
- Comments explain the thought process and optimization techniques
- Test cases cover edge cases and typical scenarios
- Solutions are optimized for both readability and performance
This is a personal practice repository, but suggestions and improvements are welcome!
This project is licensed under the ISC License.
Happy Coding! 🚀
Keep practicing, keep learning, and ace those technical interviews!