Datastructe and Algorithmns in Javascript Build Status Codecov Coverage

This is a repo with Datastructure and Algorithmns problem solved in Javascript.

Get Started

  1. Install Node 6 or newer. Need to run multiple versions of Node? Use nvm or nvm-windows
  2. Clone this repository. - git clone https://github.com/arunprabug/javascript-ci-test or download the zip
  3. Make sure you're in the directory you just created. - cd javascript-ci-test
  4. Install Node Packages. - npm install
  5. Run the validate. - npm run validate This will run the lint and prettier scripts to check the code is property linted and formatted.
  6. Run the test. - npm run test This will run the test cases configured in the project.

Topics

Mathematics

  1. Finding number of digits in a number 1
  2. Finding number of digits in a number 2
  3. Arithmentic progression
  4. Geometric progression
  5. Qudratic equation
  6. Mean and median
  7. Prime numbers
  8. LCM and HCF
  9. Factorials
  10. Permutation and combination
  11. Modular arithmetic

Recursion

  1. Sum of n natural number
  2. Factorial
  3. Power
  4. Taylor series
  5. Taylor series using Horner rule
  6. Fibonacci series
  7. Tower of Hanoi
  8. Reverse
  9. isPalindrome
  10. someRecursive
  11. Flatten
  12. capitalizeFirst
  13. capitalizeWords
  14. stringNumbers
  15. collectStrings
  16. nestedEvenSum

Arrays

  1. Array operations
  2. Linear search
  3. get, set, max and avg
  4. Reverse an array
  5. Shift an array
  6. Check if array is sorted
  7. Merge array
  8. Array - Union, intersection and difference
  9. Find missing element in an array
  10. Find missing element in an array method 2
  11. Find duplicates in sorted array
  12. Find duplicates in sorted array using hashing
  13. Find duplicates in unsorted array
  14. Find pair of elements with sum K
  15. Finding max and min in a single scan
  16. Array chunking

Strings

  1. Find length of string
  2. Change case of string
  3. Counting words and vowel in a string
  4. Validating a string
  5. Reversing a string 1
  6. Reversing a string 2
  7. Reversing a string 3
  8. Comparing string and check palindrome 1
  9. Comparing string and check palindrome 2
  10. Find duplicates in a string
  11. Find duplicates in a string using Bitwise
  12. Check if two strings are anagram 1
  13. Check if two strings are anagram 2
  14. Permutation of a string
  15. Max Chars
  16. Fizzbuzz

Problem solving patterns

  1. Frequency counter
  2. Multiple pointer
  3. Sliding window
  4. Two pointer
  5. Fast and slow pointer
  6. Merge intervals
  7. Cyclic sort

Linked List

  1. Implementation
  2. Counting nodes in Linked list
  3. Sum of all elements in Linked list
  4. Maximum element in a linked list
  5. Searching in linked list
  6. Remove duplicates in linked list
  7. Check if linked list is sorted
  8. Reverse a linked list
  9. Reverse using sliding pointers
  10. Reverse using recursion
  11. Concatenate two linked list
  12. Merge two linked list
  13. Check loop in linked list
  14. Finding middle point of linked list

Double Linked List

Circular Linked List

Stack

Queues

Trees

Binary search trees

AVL trees

Search trees

Heap

Sorting techniques

Hashing techniques

Graphs

Dependencies

Dependency Use
eslint lints javascript
eslint-config-prettier esling configuration for prettier
husky git precommit hook
jest test runner to run unit tests
prettier code formatter
babel-core Compiler to transpile new javascript to old javascript
babel-jest babel helper for jest runner
@babel/preset-env babel helper to preset env