Solutions to problems explained and taught in a video series.
Master coding interviews at FAANG - PSDS / DSA rounds problems / LeetCode problems
These videos are by ZerotoMastery.io
-
LeetCode Problem 1
findTwoSum : Given an array of integers, return the indices of target sum.
-
LeetCode Problem 11
Two Shifting Pointers - maxArea : Given an array of positive integers representing a vertical line on a chart, where the base is the x-axis, find two lines that would contain the greatest amount of water. return the area of water it would hold.
-
LeetCode Problem 42
Hard array problem Critical thinking problem; Given an array of integers representing an elevation map, where width of each bar is 1, return how much rain water can be trapped
-
LeetCode Problem 844
String problem - Backspace Compare - compare two strings A, B check if they are equal. every "#" is a backspace character.
-
LeetCode Problem 3
String problem - Longest substring without repeating characters - Return the length of longest contigious substring without repeating characters
-
LeetCode Problem 125
String Problem - Subproblem - Palindromes - Check if given string is a valid palindrome. Standard problem. Assume only alpha numberic characters are valid. remove spaces, punctuations, etc
-
Linked List Problem
Reverse a given Linked List
-
Doubly linked list Problem
Subproblem - Flatten a given doubly linked list
-
Cycle detection in a linked list
Floyd's tortoise and hare algorithm - Implementation of the algo to check for cycle in a given linked list and get the starting point.
-
Stack Datastructure
Subproblem - check for string with paranthesis for validity
-
Stack Problem
Subproblem - Remove the least number of brackets to make a given string with brackets a valid string. It may only contain brackets and lower case characters.
-
Queue Datastructure
Implement Queue using stack datastructure
-
Sorting Problem
Get the Kth largest element of an unsorted array - Ignore duplicates - Use qick sort to sort the array first
Get the Kth smallest element of an unsorted array - Hoare's quick select algorithm implementation
-
Binary Search Algorithm
Input array is sorted in ascending order; find an element. Sub Problem - Find element's range in the sorted array. Use binary search to perform the secondary search in both directions.
-
Binary tree - Find max depth
Given a tree, perform DFS and get depth of the tree.