/Algos

Some of my favorite algo problems - JS & Python

Primary LanguageJavaScript

A small collection of some of my favorite algorithms completed overtime - JS & Python

LeetCode Problems

  • Range Sum of BST JS (BST)
  • Count and Say JS (Memo)
  • Power Set JS (subsets, recursion)
  • Valid Number JS (regex)
  • Coin Change JS (combinations, dynamic bottom up)
  • Group Anagrams JS
  • Water Container JS
  • First Missing Positive JS
  • Fruit Into Baskets JS

CodeSignal Arcade Problems

Intro

10 - Common Character Count JS & Python

13 - Reverse in Parentheses JS & Python

14 - Alternating Sums JS & Python

15 - Add Border JS & Python

16 - Are Similar? JS & Python

18 - Palindrome Rearranging JS & Python

21 - isIPv4Address JS & Python

22 - Avoid Obstables JS & Python

23 - Box Blur JS & Python

24 - Minesweeper JS & Python

25 - Array Replace JS & Python

26 - Even Digits Only JS & Python

27 - Variable Name JS & Python

28 - Alphabetic Shift JS & Python

29 - Chess Cell Board Color JS & Python

30 - Circle of Numbers JS & Python

32 - Absolute Values Sum Minimization JS & Python

33 - Strings Rearrangement Python

General Algos

  • kth-to-last Node JS (LL)
  • Zip Linked Lists JS (LL)
  • Reverse Linked List JS (LL, pointers)
  • Add Linked Lists JS (LL)
  • Linked List Cycle JS (LL, FLoyd, Brent)
  • Delete Dups JS (LL)
  • Doubly-Linked List JS (LL)

  • Bubble Sort JS (sort)
  • Insertion Sort JS (sort)
  • Merge Sort JS (sort, recursion)
  • Quick Sort JS (sort, recursion)

  • Observed Pin JS (adjacency map, recursion)
  • Find In Ordered Set JS (Binary Search, recursion)
  • Count Stairs JS (memo, fibonacci, recursion)
  • Power JS (recursion)

  • Each Permutation JS (permutations, Heap)

  • Knapsack JS (dynamic bottom up)

  • Common Elements JS (multiple arguments, dictionary)

  • Bin-to-Dec JS (binary, conversion)
  • Dec-to-Bin JS (binary, conversion)

  • Apple Stock JS (pointers)

  • Super Balanced (BST) JS
  • Valid BST JS (BST)

  • GCD JS (Euclid)

  • Balanced Parens JS (stack)
  • Max Stack JS (stack)

  • Rock Paper Scissors JS (permutations, recursion)

  • Med Path JS (recursion)

  • Fizzbuzz JS
  • Draw Stairs JS
  • Mode-Mean JS
  • Reverse in Place JS
  • String Rotation JS
  • Roman Numeral JS
  • Subset Sum JS
  • Match Word JS
  • Highest Product JS
  • Multiples of 3 or 5 JS
  • Num to Words JS
  • Perm-Palin JS
  • Rotate Grid JS
  • Stack-Queue JS
  • Two Sum JS
  • Count Twos JS
  • Repeat Number JS
  • Merge Ranges JS
  • Max SubArray JS
  • Anagram JS
  • Event-Emitter JS
  • Unique Number JS
  • Get All Products JS
  • Circle Country JS
  • Phonebook JS
  • New Intersections JS
  • Knight Jumps JS
  • Pascal Triangle JS
  • Poker JS
  • Missing Number JS
  • Merge Array JS
  • Apply It JS
  • Spiral Corners JS
  • Chunk it Up JS
  • Lockdown JS(returns a function)
  • Array Dimensions JS(recursion)
  • Max By JS
  • Chunk JS

HackerRank Problems

CodeWars Problems

https://leetcode.com/aflinky/

https://www.hackerrank.com/avflinkette

https://app.codesignal.com/profile/amanda_f7

https://www.codewars.com/users/avf2114

Getting Started

  1. Clone repo
  2. npm i to install dependencies
  3. git checkout -b <your name or whatever you want to name your branch> to make sure the master branch stays clean (if I set up the repo perms correctly you should not be able to push to master anyway)
  4. Send me your github handle so I can add you to the repo and you can push to a branch

Doing Algos

The master branch is a mixture of solved and blank slate problems -- I'm currently in the process of moving answers into the answer-branch branch. Blank slate algos should all have unit tests for you to test your code.

If you are looking at my answer-branch beware not everything is neat or organized

Complete all algos on your own branch to keep track of your work

Testing

Run all test suites: npm test

Run a specifc test suite: npm test <name of test> ex. npm test knapsack