This document contains summaries of coding challenges completed over 57 days, with each day's work labeled and attributed to Dinesh Varyani. Problems include array, string, linked list, tree, and graph algorithms.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
346 views
100 Days To Faang
This document contains summaries of coding challenges completed over 57 days, with each day's work labeled and attributed to Dinesh Varyani. Problems include array, string, linked list, tree, and graph algorithms.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 101
Dinesh Varyani Dinesh Varyani
DAY 1 Two Sum Best Time to Buy and Sell Stock Majority Element Move Zeroes Squares of a Sorted Array Merge Sorted Array
Dinesh Varyani Dinesh Varyani
DAY 2 Remove Duplicates from Sorted Array Remove Duplicates from Sorted Array II Find All Numbers Disappeared in an Array Intersection of Two Arrays Intersection of Two Arrays II Maximum Population Year Find Pivot Index
Dinesh Varyani Dinesh Varyani
DAY 3 Running Sum of 1d Array Remove Element Find Winner on a Tic Tac Toe Game Build Array from Permutation Third Maximum Number Valid Mountain Array
Dinesh Varyani Dinesh Varyani
DAY 4 Find Common Characters Sum of All Odd Length Subarrays Range Sum Query - Immutable Shuffle the Array Max Consecutive Ones Sort Array By Parity
Dinesh Varyani Dinesh Varyani
DAY 5 Reverse Linked List Remove Linked List Elements Remove Duplicates from Sorted List Merge Two Sorted Lists Middle of the Linked List Palindrome Linked List
Dinesh Varyani Dinesh Varyani
DAY 6 Intersection of Two Linked Lists Linked List Cycle Valid Parentheses Implement Queue using Stacks Backspace String Compare Next Greater Element I
Dinesh Varyani Dinesh Varyani
DAY 7 Binary Tree Preorder Traversal Binary Tree Inorder Traversal Binary Tree Postorder Traversal Maximum Depth of Binary Tree Invert Binary Tree Symmetric Tree
Dinesh Varyani Dinesh Varyani
DAY 8 Subtree of Another Tree Diameter of Binary Tree Balanced Binary Tree Merge Two Binary Trees Same Tree
Dinesh Varyani Dinesh Varyani
DAY 9 Path Sum Binary Tree Paths Cousins in Binary Tree Convert Sorted Array to Binary Search Tree Range Sum of BST
Dinesh Varyani Dinesh Varyani
DAY 10 Valid Palindrome Valid Palindrome II Longest Palindrome Longest Common Prefix Valid Anagram First Unique Character in a String
Dinesh Varyani Dinesh Varyani
DAY 11 Is Subsequence Reverse String Reverse String II Reverse Words in a String III Isomorphic Strings Remove All Adjacent Duplicates In String
Dinesh Varyani Dinesh Varyani
DAY 12 Defanging an IP Address Reverse Only Letters Reverse Vowels of a String Length of Last Word Add Strings Fizz Buzz
Dinesh Varyani Dinesh Varyani
DAY 13 Roman to Integer Palindrome Number Happy Number Power of Two Sqrt(x) Plus One
Dinesh Varyani Dinesh Varyani
DAY 14 Count Odd Numbers in an Interval Range Rectangle Overlap Add Digits Maximum Product of Three Numbers Excel Sheet Column Number
Dinesh Varyani Dinesh Varyani
DAY 15 Add Binary Counting Bits Number of 1 Bits Single Number Missing Number Reverse Bits Hamming Distance
Dinesh Varyani Dinesh Varyani
DAY 16 Binary Search Search Insert Position First Bad Version Valid Perfect Square Kth Missing Positive Number Kth Largest Element in a Stream
Dinesh Varyani Dinesh Varyani
DAY 17 Design HashMap Ransom Note Contains Duplicate Contains Duplicate II Jewels and Stones Unique Number of Occurrences
Dinesh Varyani Dinesh Varyani
DAY 18 Word Pattern Number of Good Pairs Flood Fill Island Perimeter Find if Path Exists in Graph
Dinesh Varyani Dinesh Varyani
DAY 19 Fibonacci Number Min Cost Climbing Stairs Climbing Stairs Pascal's Triangle Can Place Flowers Maximum Units on a Truck
Dinesh Varyani Dinesh Varyani
DAY 20 3Sum 3Sum Closest Non-decreasing Array Product of Array Except Self
Dinesh Varyani Dinesh Varyani
DAY 21 Merge Intervals Insert Interval Non-overlapping Intervals Interval List Intersections
Dinesh Varyani Dinesh Varyani
DAY 22 Container With Most Water Sort Colors Rotate Array Contiguous Array
Dinesh Varyani Dinesh Varyani
DAY 23 Subarray Sum Equals K Shortest Unsorted Continuous Subarray Maximum Points You Can Obtain from Cards Max Consecutive Ones III
Dinesh Varyani Dinesh Varyani
DAY 24 Permutation in String Wiggle Sort II Max Chunks To Make Sorted H-Index
Dinesh Varyani Dinesh Varyani
DAY 25 Remove Nth Node From End of List Delete Node in a Linked List Remove Duplicates from Sorted List II Next Greater Node In Linked List
Dinesh Varyani Dinesh Varyani
DAY 26 Add Two Numbers Add Two Numbers II Copy List with Random Pointer Reverse Linked List II
Dinesh Varyani Dinesh Varyani
DAY 27 Swap Nodes in Pairs Odd Even Linked List Partition List
Dinesh Varyani Dinesh Varyani
DAY 28 Sort List Reorder List Rotate List
Dinesh Varyani Dinesh Varyani
DAY 29 Evaluate Reverse Polish Notation Min Stack Daily Temperatures Decode String
Dinesh Varyani Dinesh Varyani
DAY 30 Next Greater Element II Next Greater Element III Minimum Remove to Make Valid Parentheses 132 Pattern
Dinesh Varyani Dinesh Varyani
DAY 31 Asteroid Collision Basic Calculator II Remove K Digits Remove Duplicate Letters
Dinesh Varyani Dinesh Varyani
DAY 32 Remove All Adjacent Duplicates in String II Flatten Nested List Iterator Simplify Path Longest Absolute File Path
Dinesh Varyani Dinesh Varyani
DAY 33 Open the Lock Shortest Bridge LRU Cache
Dinesh Varyani Dinesh Varyani
DAY 34 Longest Substring Without Repeating Characters String to Integer (atoi) Find All Anagrams in a String Group Anagrams Pancake Sorting
Dinesh Varyani Dinesh Varyani
DAY 35 Longest Repeating Character Replacement Largest Number Number of Matching Subsequences Find the Index of the First Occurrence in a String
Dinesh Varyani Dinesh Varyani
DAY 36 Longest Substring with At Least K Repeating Characters Zigzag Conversion Reverse Words in a String String Compression Count and Say
Dinesh Varyani Dinesh Varyani
DAY 37 Binary Tree Level Order Traversal Binary Tree Zigzag Level Order Traversal Construct Binary Tree from Preorder and Inorder Traversal Lowest Common Ancestor of a Binary Tree
Dinesh Varyani Dinesh Varyani
DAY 38 Binary Tree Right Side View Populating Next Right Pointers in Each Node Populating Next Right Pointers in Each Node II Maximum Width of Binary Tree
Dinesh Varyani Dinesh Varyani
DAY 39 Path Sum II Path Sum III All Nodes Distance K in Binary Tree Flatten Binary Tree to Linked List
Dinesh Varyani Dinesh Varyani
DAY 40 Count Complete Tree Nodes Sum Root to Leaf Numbers Find Bottom Left Tree Value Distribute Coins in Binary Tree
Dinesh Varyani Dinesh Varyani
DAY 41 Delete Node in a BST Validate Binary Search Tree Kth Smallest Element in a BST Lowest Common Ancestor of a Binary Search Tree
Dinesh Varyani Dinesh Varyani
DAY 42 Convert Sorted List to Binary Search Tree Construct Binary Search Tree from Preorder Traversal Binary Search Tree Iterator Recover Binary Search Tree
Dinesh Varyani Dinesh Varyani
DAY 43 Binary Tree Maximum Path Sum Step-By-Step Directions From a Binary Tree Node to Another Maximum Level Sum of a Binary Tree
Dinesh Varyani Dinesh Varyani
DAY 44 Trim a Binary Search Tree Balance a Binary Search Tree Serialize and Deserialize Binary Tree
Dinesh Varyani Dinesh Varyani
DAY 45 Search in Rotated Sorted Array Search in Rotated Sorted Array II Time Based Key-Value Store Find Minimum in Rotated Sorted Array
Dinesh Varyani Dinesh Varyani
DAY 46 Find First and Last Position of Element in Sorted Array Find the Duplicate Number Minimum Size Subarray Sum Single Element in a Sorted Array
Dinesh Varyani Dinesh Varyani
DAY 47 Find Peak Element Capacity To Ship Packages Within D Days Koko Eating Bananas Peak Index in a Mountain Array
Dinesh Varyani Dinesh Varyani
DAY 48 Search a 2D Matrix Search a 2D Matrix II Spiral Matrix Spiral Matrix II
Dinesh Varyani Dinesh Varyani
DAY 49 Valid Sudoku Rotate Image Set Matrix Zeroes Game of Life
Dinesh Varyani Dinesh Varyani
DAY 50 Diagonal Traverse Matrix Block Sum Battleships in a Board Snapshot Array
Dinesh Varyani Dinesh Varyani
DAY 51 Number of Islands 01 Matrix Clone Graph Rotting Oranges
Dinesh Varyani Dinesh Varyani
DAY 52 Course Schedule Course Schedule II Accounts Merge Word Search
Dinesh Varyani Dinesh Varyani
DAY 53 Minimum Height Trees Pacific Atlantic Water Flow Cheapest Flights Within K Stops Max Area of Island
Dinesh Varyani Dinesh Varyani
DAY 54 Evaluate Division Number of Provinces Surrounded Regions Network Delay Time
Dinesh Varyani Dinesh Varyani
DAY 55 All Paths From Source to Target Redundant Connection Shortest Path in Binary Matrix Number of Operations to Make Network Connected
Dinesh Varyani Dinesh Varyani
DAY 56 Majority Element II Longest Consecutive Sequence Insert Delete GetRandom O(1) Find All Duplicates in an Array
Dinesh Varyani Dinesh Varyani
DAY 57 Continuous Subarray Sum Find and Replace Pattern K-diff Pairs in an Array Custom Sort String
Dinesh Varyani Dinesh Varyani
DAY 58 Fraction to Recurring Decimal Fruit Into Baskets Encode and Decode TinyURL Minimum Area Rectangle
Dinesh Varyani Dinesh Varyani
DAY 59 Maximum Subarray Maximum Product Subarray Coin Change Coin Change II
Dinesh Varyani Dinesh Varyani
DAY 60 Jump Game Jump Game II Jump Game III Partition Equal Subset Sum
Dinesh Varyani Dinesh Varyani
DAY 61 Longest Increasing Subsequence Unique Paths Unique Paths II Maximal Square
Dinesh Varyani Dinesh Varyani
DAY 62 House Robber House Robber II House Robber III Decode Ways
Dinesh Varyani Dinesh Varyani
DAY 63 Best Time to Buy and Sell Stock II Minimum Path Sum Longest Common Subsequence Palindrome Partitioning
Dinesh Varyani Dinesh Varyani
DAY 64 Unique Binary Search Trees Unique Binary Search Trees II Target Sum Triangle
Dinesh Varyani Dinesh Varyani
DAY 65 Longest Palindromic Subsequence Partition to K Equal Sum Subsets Delete and Earn Palindromic Substrings
Dinesh Varyani Dinesh Varyani
DAY 66 Longest String Chain Minimum Cost For Tickets Delete Operation for Two Strings Perfect Squares
Dinesh Varyani Dinesh Varyani
DAY 67 Different Ways to Add Parentheses Longest Palindromic Substring Largest Divisible Subset Integer Break
Dinesh Varyani Dinesh Varyani
DAY 68 Matchsticks to Square Knight Dialer Minesweeper
Dinesh Varyani Dinesh Varyani
DAY 69 Random Pick with Weight Pow(x, n) Reverse Integer Multiply Strings
Dinesh Varyani Dinesh Varyani
DAY 70 Count Primes Integer to Roman Robot Bounded In Circle Angle Between Hands of a Clock
Dinesh Varyani Dinesh Varyani
DAY 71 K Closest Points to Origin Task Scheduler Top K Frequent Elements Find K Closest Elements
Dinesh Varyani Dinesh Varyani
DAY 72 Kth Largest Element in an Array Kth Smallest Element in a Sorted Matrix Top K Frequent Words Reorganize String
Dinesh Varyani Dinesh Varyani
DAY 73 Sort Characters By Frequency Car Pooling Find K Pairs with Smallest Sums Maximum Number of Events That Can Be Attended
Dinesh Varyani Dinesh Varyani
DAY 74 Implement Trie (Prefix Tree) Word Break Design Add and Search Words Data Structure Search Suggestions System Remove Sub-Folders from the Filesystem
Dinesh Varyani Dinesh Varyani
DAY 75 Permutations Permutations II Subsets Subsets II
Dinesh Varyani Dinesh Varyani
DAY 76 Next Permutation Combinations Letter Combinations of a Phone Number Generate Parentheses
Dinesh Varyani Dinesh Varyani
DAY 77 Combination Sum Combination Sum III Combination Sum IV Restore IP Addresses
Dinesh Varyani Dinesh Varyani
DAY 78 Gas Station Partition Labels Valid Parenthesis String Minimum Number of Arrows to Burst Balloons
Dinesh Varyani Dinesh Varyani
DAY 79 Single Number II Single Number III Maximum XOR of Two Numbers in an Array Divide Two Integers
Dinesh Varyani Dinesh Varyani
DAY 80 Sum of Two Integers Bitwise AND of Numbers Range Gray Code
Dinesh Varyani Dinesh Varyani
DAY 81 Sliding Window Maximum Trapping Rain Water Count of Smaller Numbers After Self
Dinesh Varyani Dinesh Varyani
DAY 82 Candy Reverse Pairs Subarrays with K Different Integers Number of Submatrices That Sum to Target
Dinesh Varyani Dinesh Varyani
DAY 83 Shortest Subarray with Sum at Least K Maximum Gap First Missing Positive
Dinesh Varyani Dinesh Varyani
DAY 84 Shuffle an Array Reverse Nodes in k-Group LFU Cache
Dinesh Varyani Dinesh Varyani
DAY 85 Basic Calculator Largest Rectangle in Histogram Longest Valid Parentheses
Dinesh Varyani Dinesh Varyani
DAY 86 Maximum Frequency Stack The Skyline Problem Minimum Window Substring
Dinesh Varyani Dinesh Varyani
DAY 87 Palindrome Pairs Shortest Palindrome Text Justification
Dinesh Varyani Dinesh Varyani
DAY 88 Nth Digit Integer to English Words Max Points on a Line
Dinesh Varyani Dinesh Varyani
DAY 89 Maximum Profit in Job Scheduling Median of Two Sorted Arrays Find Minimum in Rotated Sorted Array II
Dinesh Varyani Dinesh Varyani
DAY 90 Word Ladder Word Ladder II Longest Increasing Path in a Matrix
Dinesh Varyani Dinesh Varyani
DAY 91 Word Search II Bus Routes Critical Connections in a Network
Dinesh Varyani Dinesh Varyani
DAY 92 Shortest Path in a Grid with Obstacles Elimination Reconstruct Itinerary Making A Large Island
Dinesh Varyani Dinesh Varyani
DAY 93 Merge k Sorted Lists Find Median from Data Stream Smallest Range Covering Elements from K Lists
Dinesh Varyani Dinesh Varyani
DAY 94 Minimum Number of Refueling Stops Swim in Rising Water Longest Duplicate Substring
Dinesh Varyani Dinesh Varyani
DAY 95 N-Queens Permutation Sequence Sudoku Solver Palindrome Partitioning II
Dinesh Varyani Dinesh Varyani
DAY 96 K-th Symbol in Grammar Remove Invalid Parentheses Unique Paths III
Dinesh Varyani Dinesh Varyani
DAY 97 Edit Distance Regular Expression Matching Maximal Rectangle
Dinesh Varyani Dinesh Varyani
DAY 98 Split Array Largest Sum Burst Balloons Wildcard Matching
Dinesh Varyani Dinesh Varyani
DAY 99 Best Time to Buy and Sell Stock IV Word Break II Russian Doll Envelopes Validate Stack Sequences
Dinesh Varyani Dinesh Varyani
DAY 100 Minimum Insertion Steps to Make a String Palindrome Minimum Cost to Cut a Stick Minimum Number of Taps to Open to Water a Garden Binary Tree Cameras