This repo is built for algorithm problems and practice, with the main goal being to hone my problem-solving methodogy. A list of all the algorithms is below, grouped by category.
(E) === Easy, (M) === Medium, (H) === Hard
- Roman Numerals to Integers (E) BLOOMBERG QUESTION
- Longest Uncommon Substring (M) BLOOMBERG QUESTION
- Reverse an Integer (E) BLOOMBERG QUESTION
- Are these Strings Isomorphic? (M)
- Number of Matching Subsequences (M)
- Needle in a Haystack (E)
- All Permutations of a string (M) BLOOMBERG QUESTION
- Validate Parentheses (E) BLOOMBERG QUESTION
- Balloon Finder (E)
- Uncommon Words (E)
- License Creator (E)
- Compare Strings by Frequency of the Smallest Character (E)
- Turn a number into a properly comma delimitated string (E)
- Return the most used character in a string (E)
- Interweave strings (E)
- Tic Tac Toe Solver (E)
- Remove Third Character (E)
- One Dimensional Candy Crush (M) Stack Problem BLOOMBERG QUESTION
- First Unique Character in a String (E) BLOOMBERG QUESTION
- Remove all Duplicates (E) BLOOMBERG QUESTION
- Decode String (H) BLOOMBERG QUESTION
- Remove All Duplicates in a String (M) BLOOMBERG QUESTION
- Duplicate Values First (M) BLOOMBERG QUESTION
- Find and Replace in String (M) SIMON DATA QUESTION
- Sort String by Character Frequency (M) - BLOOMBERG QUESTION
- All Anagrams in Two Strings (M) - BLOOMBERG QUESTION
- Swap Nodes (M)
- Reverse a Linked List (E)
- Is there a loop in this Linked List? (E).
- Tortoise and the Hare method
- Remove Duplicates (E)
- Remove All Targeted Values from a Linked List (E)
- Merge a Sorted Linked List (M) BLOOMBERG QUESTION
- Remove nth Node (M)
- Do They Merge? (E) BLOOMBERG QUESTION
- Add Two Numbers (M) BLOOMBERG QUESTION
- LRU Cache (M)
- Odds and Evens (M) BLOOMBERG QUESTION
- Flatten a Multilevel Doubly Linked List (M) BLOOMBERG QUESTION
- Insert Into a Sorted Cyclical List (M) BLOOMBERG QUESTION
- Copy List With Random Pointer (M) BLOOMBERG QUESTION
- Binary Search (E)
- Minimum Jumps to end of Array (M)
- Valid Sudoku Solution (M)
- Number of Islands (M)
- Merge Sort (E)
- Rotate a Matrix (M)
- Best Time to Buy and Sell Stocks (E) BLOOMBERG QUESTION
- Find the Duplicate Number (M)
- Generate Pacsal's Triangle (E)
- Product of Array Except Self (naive and optimized) (M) BLOOMBERG QUESTION
- Minimum Domino Flip (M)
- Pair Sum (E) BLOOMBERG QUESTION
- Move all zeros to the end of the array (E) BLOOMBERG QUESTION
- Dumb Pacman (M)
- Merge Sort Test (N/A) console.table()
- Median Sort (M)
- Potion Mixing (M)
- Max sum of equal sums (M)
- Efficiently search a matrix (M)
- Merge in Place (E) BLOOMBERG QUESTION
- Fruit into baskets (M)
- Two City Scheduling Costs (M) BLOOMBERG QUESTION
- Transaction History - Invalid Transactions (M) BLOOMBERG QUESTION
- Meeting Rooms II (M) BLOOMBERG QUESTION
- Elimination Game (M) BLOOMBERG QUESTION
- Valid Word Square (E) BLOOMBERG QUESTION
- Missing Element in Sorted Array (E) BLOOMBERG QUESTION
- 2-D Candy Crush (M) BLOOMBERG QUESTION
- Valid Triangles (M) BLOOMBERG QUESTION
You can require a BST creator from ./treeCreator for testing purposes using -----> const bst = require('./treeCreator')
- Simple Binary Search (E)
- Merge Binary Trees (E)
- Max Depth of a Binary Tree (M) BLOOMBERG QUESTION
- Reverse Breadth First Levels (E) BLOOMBERG QUESTION
- Minimum Difference (E)
- Range Sum (E)
- Pre-order Traversal of nAry tree (E)
- Validate BST (M) BLOOMBERG QUESTION
- Flatten a Binary Tree (E) BLOOMBERG QUESTION
- Invert a Binary Tree (E)
- Populating Next Right Pointer (M) BLOOMBERG QUESTION
- Binary Tree Vertical Order Traversal (M) BLOOMBERG QUESTION
- Max Width of a Binary Tree (M) BLOOMBERG QUESTION
- Generate Parentheses (H) BLOOMBERG QUESTION
- N Queens (H)
- N Queens Naive (H) Works but is not ideal
- Does Word Exist in Matrix (M)
- Which Words Exist in Matrix - Word Search (M) BLOOMBERG QUESTION
- Path With Maximum Gold (M)
You can require a non-directional Graph creator for testing purposes using -----> const graph = require('./nonDirectedGraph.js')
You can require a Directional Graph creator for testing purposes using -----> const graph = require('./directedGraph.js')
You can require a Weighted Non-Directed Graph Constructor for testing purposes using -----> const graph = require('./WeightedGraph.js')
- Simple Graph Implementation (E)
- Does Path Exist Between Two Nodes in a Graph (E)
- Djikstras Shortest Path Algorithm (M)
- All Paths from Start to End in an Acyclic Graph (M) BLOOMBERG QUESTION
- Keys and Rooms - Can you Escape?? (M) SIMON DATA
- Kill Process (M) BLOOMBERG QUESTION
- Walls and Gates (M) BLOOMBERG QUESTION
- Coin Change (M) BLOOMBERG QUESTION
- Unique Paths I (M)
- Unique Paths II (M)
- Min Path Sum (M) BLOOMBERG QUESTION
- Min Path of a Triangle (M)
- River Sizes (M)
- Levenshtein Distance (H) BLOOMBERG QUESTION
- Number of Islands (M) BLOOMBERG QUESTION
- Longest Increasing Subsequence (M)
- Subset Sum (M)
- Word Break (M) BLOOMBERG QUESTION
- Jump Game (M)
- Handshake Problem (E)
- Fibonacci Sequence (E)
- Min Falling Path Sum (M)
- Maximum Sub Array (E) BLOOMBERG QUESTION
- House Robber (E) BLOOMBERG QUESTION
You can require a:
-
Max Binary Heap Constructor from /maxHeapConstructor.js for testing purposes using -----> const Heap = require('./heapConstructor.js') and let newHeap = new Heap()
-
Max Priority Queue Constructor from /maxPriorityQueueConstructor.js for testing purposes using -----> const MaxQueue = require('./maxPriorityQueueConstructor.js') and let newMaxQueue = new MaxQueue()
-
Min Priority Queue Constructor from /minPriorityQueueConstructor.js for testing purposes using -----> const MinQueue = require('./minPriorityQueueConstructor.js') and let newMinQueue = new MinQueue()
- Min Priority Queue Test
- Max Priority Queue Test
- Max Heap Test
- Count the ones in the Binary Representation of a Given Integer, the Hamming Weight (M)
- Count the non-zero numbers in the n-Ary Representation of a Given Integer, the N-Hamming Weight (M)
- Currying Function (M)
- Pumpkin Picker (E)
- LRU Cache (M) BLOOMBERG QUESTION
- Min Stack with Constant Time Operations (E) BLOOMBERG QUESTION
- First Unique Number in Constant Time (M) BLOOMBERG QUESTION
- Insert Delete GetRandom O(1)(M) BLOOMBERG QUESTION
- Binary Search Tree Iterator (M) BLOOMBERG QUESTION
See all the questions here: https://leetcode.com/company/bloomberg/
- Flatten a Nested Linked List
- Two City Scheduling
- Invalid Transactions
- All Paths from Start to End in an Acyclic Graph
- 2-D Candy Crush
- Decode String
- LRU Cache
- Number of Islands
- Min Stack
- Insert Delete GetRandom O(1)
- Word Break
- Populating Next Right Pointer
- Copy List With Random Pointers
- Valid Triangles
- Remove All Duplicates in a String II
- Kill Process
- Meeting Rooms II
- Missing Element in Sorted Array
- Valid Word Square
- Elimination Game
- Remove Duplicates
- One Dimensional Candy Crush
- Add Two Numbers
- Move Zeroes
- Pair Sum
- Odds and Evens Linked List
- Binary Tree Vertical Order Traversal
- Sort String by Character Frequency
- Max Width of Binary Tree
- First Unique Character In A String
- Insert Into a Sorted Cyclical List
- Longest Uncommon Sub String
- Word Search
- Levenshtein Distance
- Valid Anagram
- Generate Parentheses
- Merge Two Sorted Lists
- Intersection of Two Sorted Lists
- BST Iterator
- Validate BST
- Permutations
- Coin Change
- Flatten a Binary Tree to Linked List
- Merge Sorted Array
- BST Level Order Traversal
- Validate Parens
- Roman to Integer
- Min Path Sum
- Best Time to Buy and Sell Stock
- House Robber
- Product of Array Except Self
- Max Depth of Binary Tree
- Maximum Sub Array
- Reverse Integer
Frequency not listed: