• Stars
    star
    443
  • Rank 98,504 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

Go to Top

⚑ 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

⚑ 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! πŸ˜€

Go to Top

⚑ 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

More Repositories

1

data-structures-basics-leetcode

Basic problems + solutions on data structures and algorithms grouped by category. It also has an ever-growing collection of Leetcode problems and solutions.
Python
27
star
2

cloakspace

An anonymous platform for everyone to share their thoughts freely without the fear of being tracked or the prying eyes of social media.
TypeScript
14
star
3

simplifying

A lightweight library containing multiple utility functions to make your life easier when dealing with arrays and objects.
TypeScript
5
star
4

add-cors

A simple Node proxy to attach CORS headers to a response of a queried request to an endpoint.
JavaScript
5
star
5

pottermania

Pottermania is basically a website which allows you to take a quiz based on the magical world of Harry Potter. There is no predefined question bank. Rather, questions are generated based on a simple algorithm, every time an user takes the quiz. Data is fetched using an API.
JavaScript
3
star
6

flixathon

A website which uses an API key to search the TMDb database for movies and add them to corresponding lists. There is an option to share the lists through various media like mail, tweets, whatsapp, sms. Made using HTML, CSS, Bootstrap, JavaScript(jQuery), Ajax, PHP, MySQL. Hosted by a free hosting service.
PHP
1
star
7

slashandwin

A game where you swipe to score and die if you lose too many lives or the timer runs out. Made using HTML, CSS, JS(jQuery, jQuery UI)..
JavaScript
1
star
8

RESTful-API-for-article-manager

A RESTful API made using NodeJS (Express) and MongoDB (mongoose) to manage a platform where users (or authors) can signup and collaborate on different articles, leave reviews and organize their work.
JavaScript
1
star