Algoexpert Data Structures Algorithms Save

A collection of solutions for all problem statements on the AlgoExpert Coding Interview platform.

Project README

:star: algo-expert

AlgoExpert cover image

License: MIT GitHub repo size Active Generic badge Generic badge

Description: This is a collection of all AlgoExpert Coding Interview questions that are currently available on the platform. There are solutions for each problem statement including time and space complexity. Since AlgoExpert is a paid platform, everyone doesn't have access to it or can't afford to. I hope this helps everyone to access the content and improve their problem solving skills.

Solutions: The solutions are provided in Python.

Go to Top

⚡ LIST OF PROBLEMS

⭐ : Coding Interview Problems

Difficulty chart:

🟩 : Easy
🟦 : Medium
🟥 : Hard
⬛ : Very Hard

Problem Statement Difficulty Solution
:star: Two Number Sum 🟩 two-number-sum.py
:star: Validate Subsequence 🟩 validate-subsequence.py
:star: Tournament Winner 🟩 tournament-winner.py
:star: Non-Constructible Change 🟩 non-constructible-change.py
:star: Find Closest Value in BST 🟩 closest-in-BST.py
:star: Branch Sums 🟩 branch-sums.py
:star: Node Depths 🟩 node-depths.py
:star: Depth First Search 🟩 depth-first-search.py
:star: Minimum Waiting Time 🟩 minimum-waiting-time.py
:star: Class Photos 🟩 class-photos.py
:star: Remove Duplicates from Linked List 🟩 remove-duplicates.py
:star: Nth Fibonacci 🟩 nth-fibonacci.py
:star: Validate Subsequence 🟩 validate-subsequence.py
:star: Product Sum 🟩 product-sum.py
:star: Binary Search :green_square: binary-search.py
:star: Find Three Largest Numbers :green_square: find-three-largest-numbers.py
:star: Bubble Sort :green_square: bubble-sort.py
:star: Insertion Sort :green_square: insertion-sort.py
:star: Selection Sort :green_square: selection-sort.py
:star: Palindrome Check :green_square: palindrome-check.py
:star: Caesar Cipher Encryptor :green_square: caesar-cipher-encryptor.py
:star: Run Length Encoding :green_square: run-length-encoding.py
:star: Generate Document :green_square: generate-document.py
:star: Sorted Square Array :green_square: sorted-square-array.py
:star: First Non Repeating Character :green_square: first-non-repeating-character.py
:star: Tandem Bicycle :green_square: tandem-bicycle.py
:star: Three Number Sum :blue_square: three-number-sum.py
:star: Smallest Difference :blue_square: smallest-difference.py
:star: Move Element to End :blue_square: move-element-to-end.py
:star: Monotonic Array :blue_square: monotonic-array.py
:star: Spiral Traverse :blue_square: spiral-traverse.py
:star: Longest Peak :blue_square: longest-peak.py
:star: Array of Products :blue_square: array-of-products.py
:star: First Duplicate Value :blue_square: first-duplicate-value.py
:star: Merge Overlapping Intervals :blue_square: merge-overlapping-intervals.py
:star: BST Construction :blue_square: bst-construction.py
:star: Validate BST :blue_square: validate-bst.py
:star: BST Traversal :blue_square: bst-traversal.py
:star: Min Height BST :blue_square: min-height-bst.py
:star: Find Kth Largest Value In BST :blue_square: find-kth-largest-value-in-bst.py
:star: Reconstruct BST :blue_square: reconstruct-bst.py
:star: Invert Binary Tree :blue_square: invert-binary-tree.py
:star: Binary Tree Diameter :blue_square: binary-tree-diameter.py
:star: Height Balanced Binary Tree :blue_square: height-balanced-binary-tree.py
:star: Max Subset Sum No Adjacent :blue_square: max-subset-sum-no-adjacent.py
:star: Number of Ways to Make Change :blue_square: ways-to-make-change.py
:star: Min Number of Coins for Change :blue_square: min-number-of-coins-for-change.py
:star: Levenshtein Distance :blue_square: levenshtein-distance.py
:star: Kadane's Algorithm :blue_square: kadane's-algorithm.py
:star: Single Cycle Check :blue_square: single-cycle-check.py
:star: Breadth First Search :blue_square: breadth-first-search.py
:star: Youngest Common Ancestor :blue_square: youngest-common-ancestor.py
:star: Remove Islands :blue_square: remove-islands.py
:star: Cycle In Graph :blue_square: cycle-in-graph.py
:star: Minimum Passes of Matrix :blue_square: minimum-passes-of-matrix.py
:star: Task Assignment :blue_square: task-assignment.py
:star: Valid Starting City :blue_square: valid-starting-city.py
:star: Min Heap Construction :blue_square: min-heap-construction.py
:star: Linked List Construction :blue_square: linked-list-construction.py
:star: Remove Kth Node From End :blue_square: remove-kth-node-from-end.py
:star: Sum of Linked Lists :blue_square: sum-of-linked-lists.py
:star: Permutations :blue_square: permutations.py
:star: Powerset :blue_square: powerset.py
:star: Phone Number Mnemonics :blue_square: phone-number-mnemonics.py
:star: Staircase Traversal :blue_square: staircase-traversal.py
:star: Search in Sorted matrix :blue_square: search-in-sorted-matrix.py
:star: Three Number Sort :blue_square: three-number-sort.py
:star: Min Max Stack construction :blue_square: min-max-stack-construction.py
:star: Balanced Brackets :blue_square: balanced-brackets.py
:star: Sunset Views :blue_square: sunset-views.py
:star: Sort Stack :blue_square: sort-stack.py
:star: Next Greater Element :blue_square: next-greater-element.py
:star: Group Anagrams :blue_square: group-anagrams.py
:star: Valid IP Addresses :blue_square: valid-ip-addresses.py
:star: Reverse Words In String :blue_square: reverse-words-in-string.py
:star: Minimum Characters For Words :blue_square: minimum-characters-for-words.py
:star: Suffix Trie Construction :blue_square: suffix-trie-construction.py
:star: Four Number Sum :red_square: four-number-sum.py
:star: Subarray Sort :red_square: subarray-sort.py
:star: Largest Range :red_square: largest-range.py
:star: Min Rewards :red_square: min-rewards.py
:star: Zigzag Traverse :red_square: zigzag-traverse.py
:star: Same bsts :red_square: same-bsts.py
:star: Validate Three Nodes :red_square: validate-three-nodes.py
:star: Max Path Sum In Binary Tree :red_square: max-path-sum-in-binary-tree.py
:star: Find Nodes Distance K :red_square: find-nodes-distance-k.py
:star: Longest Common Subsequence :red_square: longest-common-subsequence.py
:star: Min Number of Jumps :red_square: min-number-of-jumps.py
:star: Water Area :red_square: water-area.py
:star: Knapsack Problem :red_square: knapsack-problem.py
:star: Disk Stacking :red_square: disk-stacking.py
:star: Numbers in Pi :red_square: numbers-in-pi.py
:star: Maximum Sum Submatrix :red_square: maximum-sum-submatrix.py
:star: Dijkstra Algorithm :red_square: dijkstra-algorithm.py
:star: Topological Sort :red_square: topological-sort.py
:star: Boggle Board :red_square: boggle-board.py
:star: Continuous Median :red_square: continuous-median.py
:star: Sort K Sorted Array :red_square: sort-k-sorted-array.py
:star: Laptop Rentals :red_square: laptop-rentals.py
:star: Find Loop :red_square: find-loop.py
:star: Reverse Linked List :red_square: reverse-linked-list.py
:star: Merge Linked Lists :red_square: merge-linked-lists.py
:star: Shift Linked Lists :red_square: shift-linked-lists.py
:star: Lowest Common Manager :red_square: lowest-common-manager.py
:star: Solve Sudoku :red_square: solve-sudoku.py
:star: Generate Div Tags :red_square: generate-div-tags.py
:star: Ambiguous Measurements :red_square: ambiguous-measurements.py
:star: Shifted Binary Search :red_square: shifted-binary-search.py
:star: Search For Range :red_square: search-for-range.py
:star: Quickselect :red_square: quickselect.py
:star: Index Equals Value :red_square: index-equals-value.py
:star: Quick Sort :red_square: quick-sort.py
:star: Heap Sort :red_square: heap-sort.py
:star: Radix Sort :red_square: radix-sort.py
:star: Shorten Path :red_square: shorten-path.py
:star: Largest Rectangle Under Skyline :red_square: largest-rectangle-under-skyline.py
:star: Longest Substring Without Duplication :red_square: longest-substring-without-duplication.py
:star: Underscorify Substring :red_square: underscorify-substring.py
:star: Pattern Matcher :red_square: pattern-matcher.py
:star: Multi String Search :red_square: multi-string-search.py
:star: Apartment Hunting :black_large_square: apartment-hunting.py
:star: Calendar Matching :black_large_square: calendar-matching.py
:star: Waterfall Streams :black_large_square: waterfall-streams.py
:star: Minimum Area Rectangle :black_large_square: minimum-area-rectangle.py
:star: Line Through Points :black_large_square: line-through-points.py
:star: Right Smaller Than :black_large_square: right-smaller-than.py
:star: Iterative Inorder Traversal :black_large_square: iterative-inorder-traversal.py
:star: Flatten Binary Tree :black_large_square: flatten-binary-tree.py
:star: Right Sibling Tree :black_large_square: right-sibling-tree.py
:star: All Kinds of Node Depths :black_large_square: all-kinds-of-node-depths.py
:star: Compare Leaf Traversal :black_large_square: compare-leaf-traversal.py
:star: Max Profits With K Transactions :black_large_square: max-profits-with-k-transactions.py
:star: Palindrome Partitioning Min Cuts :black_large_square: palindrome-partitioning-min-cuts.py
:star: Longest Increasing Subsequence :black_large_square: longest-increasing-subsequence.py
:star: Longest String Chain :black_large_square: longest-string-chain.py
:star: Square Of Zeroes :black_large_square: square-of-zeroes.py
:star: A Star Algorithm :black_large_square: A-star-algorithm.py
:star: Detect Arbitrage :black_large_square: detect-arbitrage.py
:star: Airport Connections :black_large_square: airport-connections.py
:star: Merge Sorted Arrays :black_large_square: merge-sorted-arrays.py
:star: LRU Cache :black_large_square: LRU-cache.py
:star: Rearrange Linked List :black_large_square: rearrange-linked-list.py
:star: Linked List Palindrome :black_large_square: linked-list-palindrome.py
:star: Zip Linked List :black_large_square: zip-linked-list.py
:star: Node Swap :black_large_square: node-swap.py
:star: Number of Binary Tree Topologies :black_large_square: number-of-binary-tree-topologies.py
:star: Non Attacking Queens :black_large_square: non-attacking-queens.py
:star: Merge Sort :black_large_square: merge-sort.py
:star: Count Inversions :black_large_square: count-inversions.py
:star: Longest Balanced Substring :black_large_square: longest-balanced-substring.py

Go to Top

:zap: HOW TO

You can visit this page and download the latest Python release version: Install Python
After you complete the download and install, you can run any solution by writing a 'main' section in the file so that the compiler knows the sequence of methods to call when executing the script.

For example, in case of 'Two Number Sum' problem:

if __name__=='__main__':
	print(twoNumberSum([1,3,4,5], 7))

The code can be executed like this:

python easy/twoNumberSum.py

Running a code on Python demo

Go to Top

:zap: CONTRIBUTE, CONTRIBUTE, CONTRIBUTE!

This is not near to perfect. So please feel free to fork this repo and add any solution in different languages here. You can even add test cases to make this robust. Let's help each other grow! :grinning:

Go to Top

:zap: EXTRAS

I also have a collection of Leetcode questions that I keep growing. Feel free to visit and have a look. It has more than 200 questions + solutions and also basic concepts grouped by category. 🔽

Leetcode Material and Basics

Open Source Agenda is not affiliated with "Algoexpert Data Structures Algorithms" Project. README Source: das-jishu/algoexpert-data-structures-algorithms

Open Source Agenda Badge

Open Source Agenda Rating