C++ Strings

S.NoInterview QuestionNumber of times has been asked1Delete a node in doubly linked list28482Java program to find the number of Nodes in a Binary Tree25163Reverse a string without affecting special characters24854Palindrome using Recursion22705Delete a node of a linked list at given position19917Find elements pair from array whose sum equal to number16638Sort Elements by Frequency of Occurrences16529Quick Sort163310Write a program to print all permutations of a given string162311Find Minimum Distance Between Two Numbers in an Array148912Create a Doubly Linked List145913Reverse an Array143314Smallest window in a string containing all characters of another string140915Recursively remove all adjacent duplicates137416Find a Triplet That Sum to a Given Value136717First Repeating Element135718Arrange Even and Odd number such that Odd comes after Even133319Sum of numbers in String133220Smallest Positive Number Missing in an Unsorted Array129921Check if the Elements of an Array are Consecutive126622Detect a loop in the Linked List125023Largest Sum Contiguous Subarray123724Quick Sort on SIngly Linked List123125Subarray with Given Sum122626Print all Possible Combinations of R Elements in a given Array of size N122427Recursive function to do substring search121428Find the Maximum Repeating Number in Array117829Binary Tree Level order traversal in Java113430Find the First and Second Smallest Elements113031Check if two linked lists are identical111932Maximum Subarray Sum using Divide and Conquer111833Remove characters from first string which are in second108434Find Leaders in an Array106935Swap nodes in the linked list105136Find the Number Occurring Odd Number of Times in an Array101337Find the second most frequent character100538Arrange given Numbers to Form the Biggest Number II100439Given a string find its first non-repeating character98440Find Triplet in Array With a Given Sum97441Given a sorted array and a number x, find the pair in array whose sum is closest to x96442Total number of occurrences of a given item in the linked list96443A Program to check if strings are rotations of each other or not96344Print all possible words from phone digits94645Find the Missing Number93746Rearrange Positive and Negative Numbers Alternatively in Array93147Longest Palindromic Substring91948Segregate even and odd nodes in a linked list90249Print Longest common subsequence896

50Union and Intersection of Two Linked Lists88651Transform one string to another using minimum number of given operations88452Check rearranged string can form a palindrome86653Rearrange given Array in Maximum Minimum Form85654Iterative Implementation of Quick Sort84555Insertion Sort83656Count Possible Triangles83557Multiplication of Two Matrices81758Count of Triplets With Sum Less than Given Value80759Check if the linked list is palindrome80660Rotate a Linked List80461Stock Buy Sell to Maximize Profit80262Tug of War77663Concatenation of two strings77364Print all duplicates in the input string76965Count Number of Substrings with K Distinct Character’s76866Find Nearest Greater and Smaller Element75867Reverse String Without Temporary Variable75368The Celebrity Problem75269Find Pythagorean Triplets from Array74871Find all Common Elements in Given Three Sorted Arrays73872Remove all duplicates in an unsorted linked list71973Find the Row with Maximum Number of 1’s71574Find the Peak Element from an Array71075Find the subarray whose sum is equal to a given number X70976Remove Minimum Characters so that Two Strings Become Anagrams70677Find Smallest Missing Number in a Sorted Array70278Addition of Two Matrices69879A Product Array Puzzle69680Generate all Binary Strings Without Consecutive 1’s69481Implement Two Stacks in an Array68682Maximum Sum of Non Consecutive Elements68683Maximum Product Subarray II67184Lexicographic rank of string66885Check if Two given Matrices are Identical66186Multiplication of Previous and Next66087Subtraction of Two Matrices64988Move All the Zeros to the End of the Given Array64489Merge K Sorted Arrays and Print Sorted Output64390Divide a string in N equal parts64091Online Algorithm for Checking Palindrome in a Stream63993Check whether two strings are anagram of each other63394Remove recurring digits in a given number62795Maximum Circular Subarray Sum62196Sort a stack using a temporary stack62197Sort a linked list that is sorted alternating ascending and descending62098Subarray and Subsequence615

99Find the Minimum Element in a Sorted and Rotated Array615100Move last element of the Linked List at first place613101First Circular Tour to Visit all the Petrol Bunks611104Maximum Element in an Array which is Increasing and then Decreasing603105Flattening a linked list602106Palindrome Permutations of a String600107Elements Appear more than N/K times in Array591108Run length encoding591109Palindromes in a given range591110Minimum insertions to form a shortest palindrome591111Majority Element590112Pangram Checking588113Print all permutations with repetition587114Minimum Characters to be Added at Front to Make String Palindrome578115Repeated Subsequence of Length Two or More576116Rotate string to get lexicographically minimum string576117Most repeating character in a string576118Rearrange a given linked list in-place575119Merge a linked list into another at alternate positions574120Remove all duplicates in a sorted linked list574121Minimum number of Merge Operations to make an Array Palindrome572122Print all anagrams together in a sequence of words565123Two Sum Leetcode Solution563124Reorder an Array According to the Given Indexes5601253Sum Leetcode Solution559126Pancake Sorting Problem555127Merge Overlapping Intervals II549128Clone a Linked List with next and random pointer548129Size of The Subarray With Maximum Sum538130Transpose of a Matrix538131Removing Spaces from a String using stringstream537132Remove duplicates from a string537133Remove Extra Spaces from a String537134Smallest Palindrome after Replacement534135Check if a given string is a rotation of a palindrome534136Maximum Sum Increasing Subsequence534137Longest Palindrome can be Formed by Removing or Rearranging Characters532138Partition Problem530139Generate all Binary Strings from Given Pattern522140Check whether Strings are K Distance Apart or Not518141Length of Longest valid Substring515142Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized512143Delete Last Occurrence512144Insert Node in the Sorted Linked List510145Check if Two given Strings are Isomorphic to each other509146Maximum difference between two elements such as larger element comes after smaller503147Program to Toggle all Characters in a String503

148Given string is interleaving of two other strings or not496149Count Minimum Steps to Get the given Array492150Find Pair with Given Difference489151Merge sort better than quick sort for linked lists487152Number of Smaller Elements on Right Side487153Check length of a String is Equal to the Number Appended at its Last486154Longest Common Prefix using Divide and Conquer484155Check if all Rows of a Matrix are Circular Rotations of Each Other484156Find nth node of the Linked list from the end479157Compare Two Version Numbers476158Sort 0s 1s and 2s in an Array471159Print all interleavings of given two strings471160Find a Fixed Point in a Given Array470161Reverse words in a given string468162Reorder Array Using Given Indexes467163Median of Two Sorted Arrays LeetCode Solution466164Merge two sorted linked lists such that merged list is in reverse order465165Print Reverse of a string (Recursion)465166Find the Subarray of given length with Least Average465167Split linked list using alternate nodes461168Print string of odd length in ‘X’ format450169Find Element Using Binary Search in Sorted Array448170Swap Kth Node from beginning with Kth Node from End445171Print all Palindromic Partitions of a String445172Find K Length Subarray of Maximum Average443173Find Duplicates in an Array in Most Efficient Way436174print all palindromic partitions433175Shortest Superstring Problem431176Flatten a multilevel linked list428177Maximum Length of Chain Pairs426178Check if String Follows Order of Characters by a Pattern or not426179Sort a String According to Another String425180Sorting a K Sorted Array421181Longest Span with same Sum in two Binary Arrays II408182Find a Sorted Subsequence of size 3406183Reverse a Linked List in groups406184Program to add two binary digits404185Recursively print all the sentences that can be formed from list of word lists403186Find the two Numbers with Odd Occurrences in an Unsorted Array402187Longest Common Prefix Using Binary Search II402188Reverse a Singly Linked List (Iterative/Non-Recursive)397189Caesar Cipher395190Kth Non-repeating Character394191Check if String can Become Empty by Recursively Deleting given Substring391192Rearrange a linked list in Zig-Zag390193Longest Common Prefix Word by Word Matching386194Pancake Sorting386195Rotate Image by 90 degrees383196Permutations of a Given String Using STL381

197Perfect Reversible String380198Increasing Subsequence of Length three with Maximum Product376199Merging Two Sorted Arrays376200Find First non-repeating character in a string374202Find the point where a monotonically increasing function becomes positive first time371203Sort a linked list with 0s, 1s and 2s369204Construct a Maximum Sum Linked List out of two Sorted Linked Lists having some Common nodes369205Four Elements that Sum to Given368206List items containing all characters of a given word368207Longest Common Prefix using Character by Character Matching364208Count Number of Occurrences in a Sorted Array361209Delete N nodes after M361210Palindrome string (number)357211Maximum occurring character in a string357212Minimum Characters to be Removed to Make a Binary String Alternate355213Split a string355214Sorting the array of strings346215Valid Parentheses LeetCode Solution346216Even Substring Count345217Convert a String that is Repetition of a Substring of Length K345218Recursive Implementation of atoi()345219Check if a Linked list of Strings form a Palindrome343220Print All Distinct Elements of the Array342221Find the first Repeating Number in a Given Array339222Reverse a singly linked list recursively337223Print Shortest Path to Print a String on Screen337224Convert string1 to string2 in one edit334225Nth Character in Concatenated Decimal String334226Maximum Subarray Leetcode Solution333228Count the number of words332229wildcard character matching332230Reverse a String using Stack331231Binary Tree to Doubly linked list329232Lower Case To Upper Case328233Sort Elements by Frequency II327234Merge Two Sorted Arrays324235Find the Lost Element From a Duplicated Array322236Split Four Distinct Strings321237Matrix Chain Multiplication using Dynamic Programming319238Find middle of the Linked List318239Longest Common Subsequence with Permutations317240Count the Pairs at Same Distance as in English Alphabets315241Next Greater Element in an Array307242Roman to Integer Leetcode Solution306243Palindrome Permutation301244Find All Pairs With a Given Difference296245Find Nth Node296

246Searching a node in a Binary Search Tree294247Word Search Leetcode Solution292249Toeplitz Matrix290250Print all Possible Ways to Break a String in Bracket Form290251Delete a Tree290252Triplet from three linked lists with given sum289253Reverse a String289254Count Pairs With Given Sum287255Reverse Bits287256Change Gender of a given String286257Sort an array of strings286258Delete a node under given conditions286259How to Efficiently Implement k Stacks in a Single Array?286260N queen problem285261First non Repeating Element284262Binary Tree284263Number of sub-strings which recursively add up to 9283264Repeated Substring Pattern280265Move all negative elements to one side of array280266Meeting Rooms II LeetCode Solution279267Longest Common Extension278268Number of Islands LeetCode Solution278269Min Stack276270Longest Palindromic Substring LeetCode Solution276271Remove spaces from a string275272Remove middle points in a linked list of line segments274273Shuffle a given Array272274Most Frequent Element in an Array271275Dijkstra Algorithm268276Fibonacci numbers267278Cuckoo sequence program266279Sudoku Solver265280Max stack264281Minimize the maximum difference between the heights264282House Robber Leetcode Solution264283Word Search262284Search Insert Position Leetcode Solution259285KMP Algorithm259286Sort linked which is sorted on absolute values258287Number Of 1 bits258288Expression Evaluation257289Clone a linked list with next and random pointer (Hashing)257290Subset Leetcode256291Evaluation of Postfix Expression255292Reverse words in a string254293Plus One Leetcode Solution254294Valid Palindrome Leetcode Solution253

295Min Stack Leetcode Solution252296Combination Sum Leetcode Solution252297Merge Sorted Arrays Leetcode Solution249298Backspace String Compare249299How to Delete a Linked List248300Subarray with 0 sum246301Pair of Positive Negative Values in an Array245302Set Matrix Zeroes245303Rabin Karp Algorithm244304Common elements in all rows of a given matrix243305Reversing a Queue242306Contains Duplicate II Leetcode Solution241307Sqrt(x) Leetcode Solution240308Count of index pairs with equal elements in an array240309Tower Of Hanoi239310Delete middle element of a stack238311Intersection of Two Arrays II Leetcode Solution238312Pascal Triangle Leetcode238313Combination Sum237315Product of array except self236316Reverse individual words235317Integer to Roman Leetcode Solution235318Sliding Window Technique234319Contains Duplicate234320String Compression234321Segregate even and odd numbers233322Page Replacement Algorithms in Operating Systems232323Minimum swaps required to bring all elements less than or equal to k together232325Implementation of Deque using Doubly Linked List232326Construct Binary Tree from Given Inorder and Preorder Traversals232327Single Number Leetcode Solution231328Count Odd Numbers in an Interval Range Leetcode Solution231329Second Most Repeated Word in a Sequence231330Bellman Ford Algorithm229331Add Binary Leetcode Solution229332Group Words With Same Set of Characters228334Postfix to Infix Conversion227335Minimum Value to Get Positive Step by Step Sum Leetcode Solution227336Arithmetic Expression Evaluation227337Sort elements by frequency226338Sum of minimum and maximum elements of all subarrays of size k226339Next Permutation226341Kruskal Algorithm226343Maximum Number of Balloons Leetcode Solution225

344K-th Smallest Element in a Sorted Matrix225345Palindrome Linked List Leetcode Solution225346Longest Common Prefix Leetcode Solution223347Smallest Subarray with k Distinct Numbers223348Majority Element Leetcode Solution223349Find Lucky Integer in an Array Leetcode Solution223350Given two unsorted arrays find all pairs whose sum is x222351Minimum operation to make all elements equal in array222352Top K Frequent Words222353Sorting array using Stacks221354Scramble String221355Longest Substring Without Repeating Characters LeetCode Solution220356Evaluate Division220357Count subarrays having total distinct elements same as original array220358Permutations Leetcode Solution220359Convex Hull Algorithm219360Third Maximum Number Leetcode Solution219361Maximum Subarray218362First element occurring k times in an array218363Special Number218364Find Numbers with Even Number of Digits Leetcode Solution217365Prefix to Infix Conversion217366Number of Good Pairs Leetcode Solution217367Spiral Matrix LeetCode Solution216368Minimum Steps to reach target by a Knight215369Minimum Path Sum215370Find the Town Judge Leetcode Solution215371Swap Nodes in Pairs Leetcode Solutions215372Check if two arrays are equal or not215373Maximal Square214374Reverse a Number Using Stack214375Maximum possible difference of two subsets of an array214376Reversing the First K elements of a Queue214377Range Sum Query 2D – Immutable Leetcode Solution213378Find duplicates in a given array when elements are not limited to a range213379Fizz Buzz Leetcode213380Group Anagrams212381Missing Number Leetcode Solution212382Huffman Coding212383Count Primes Leetcode Solutions211384Running Sum of 1d Array Leetcode Solution211385Pascal’s Triangle II Leetcode Solution211386Merge Two Sorted Lists Leetcode Solutions210387Top K Frequent Elements210388Single Number210389Sort Array by Increasing Frequency Leetcode Solution210390Find the Closest Palindrome number210391Minimum Absolute Difference Leetcode Solution210392Power of Two Leetcode Solution209

393Maximum Depth of Binary Tree Leetcode Solution209394Palindrome Substring Queries209395Leetcode Permutations209396Sorting using trivial hash function209397Subset sum problem209398Search in Rotated Sorted Array Leetcode Solution208399Find All Numbers Disappeared in an Array Leetcode Solution208400House Robber II Leetcode Solution208401Maximum Distance Between two Occurrences of Same Element in Array208402Check if Array Contains Contiguous Integers With Duplicates Allowed208403Unique Paths Leetcode Solution208404Cumulative Frequency of Count of Each Element in an Unsorted Array208405Unique Paths208406Best Time to Buy and Sell Stock  II Leetcode Solution208407Convert String To Int208408Implement Stack and Queue using Deque207409Zigzag Conversion207410Find top three repeated in array207411Find Minimum In Rotated Sorted Array207412Find Number of Employees Under every Employee207413Letter Case Permutation207414Find the first repeating element in an array of integers207415Subarray Sum Equals k207416Expression Contains Redundant Bracket or Not206417Coin Change 2 Leetcode Solution206418Bipartite Graph206419Matrix Diagonal Sum Leetcode Solution206420How to Implement Stack Using Priority Queue or Heap?206421Happy Number Leetcode Solution206422Subarray Sum Equals K LeetCode Solution205423Print All Distinct Elements of a Given Integer Array205424Smallest Element Repeated Exactly K Times205425Prim’s Algorithm205426Max Consecutive Ones Leetcode Solution205427Average Salary Excluding the Minimum and Maximum Salary Leetcode Solution205428Difference between highest and least frequencies in an array205429Find Median from data Stream204430Length of the largest subarray with contiguous elements204431Find Winner on a Tic Tac Toe Game Leetcode Solution204432Print all subarrays with 0 sum203433Decode String203434Sort a stack using recursion203435Sort Integers by The Number of 1 Bit Leetcode Solution203437Subarrays with distinct elements203438Count Substrings with equal number of 0s, 1s and 2s203439Capacity To Ship Packages Within D Days Leetcode Solution202440How Many Numbers Are Smaller Than the Current Number Leetcode Solution202441Best Time to Buy and Sell Stock III Leetcode Solution202

442Check If N and Its Double Exist Leetcode Solution202443LRU Cache Implementation202444Nth Catalan Number202445Reverse a Stack Using Recursion201446Reverse Integer201447Count pairs from two linked lists whose sum is equal to a given value201448Fibonacci Number LeetCode Solution201449Remove Duplicates from Sorted Array Leetcode Solution200450Remove Minimum Number of Elements Such That no Common Element Exist in both Array200451Fizz Buzz200452Find The Duplicate Number200453Subtract the Product and Sum of Digits of an Integer Leetcode Solution200454Find elements which are present in first array and not in second199455Monotonic Array LeetCode Solution199456Find Common Characters Leetcode Solution199457Reverse Vowels of a String Leetcode Solution199458Kth largest element in an Array Leetcode Solutions198459Count and Say198460Longest Common Prefix using Trie198461Edit Distance198462Reverse a linked list198463Trapping Rain Water Leetcode Solution198464Integer to English words198465Iterative Tower of Hanoi197466Reverse a String197467Merge Two Sorted Linked Lists197468Longest subarray not having more than K distinct elements197469Sum of Subarray Ranges Leetcode Solution197470MiniMax Algorithm197471Text Justification LeetCode Solution197472Generate a String With Characters That Have Odd Counts Leetcode Solution197473Floyd Warshall Algorithm197474The K Weakest Rows in a Matrix Leetcode Solution197475Find distinct elements common to all rows of a matrix196476Sorting a Queue without Extra Space196477Find the Duplicate Element196478Priority Queue Using Singly Linked List196479Flood Fill LeetCode196480Delete a Node from linked list without head pointer196481Degree of an array196482Slowest Key Leetcode Solution196483Word Ladder LeetCode Solution196484Excel Sheet Column Number Leetcode Solution195485Shuffle String Leetcode Solution195486Reverse Words in a String III LeetCode Solution195487Prefix to Postfix Conversion195488Valid Parenthesis String194489Longest Common Subsequence194490Top View of Binary Tree194

491Substring With Concatenation Of All Words194492Iterative Inorder Traversal of a Binary Tree194493Shuffle the Array Leetcode Solution194494Find Index of Closing Bracket for a Given Opening Bracket in an Expression194495Target Sum194496Find missing elements of a range193497Find any one of the multiple repeating elements in read only array193498Find the Difference Leetcode Solution193499Rearrange a binary string as alternate x and y occurrences193500Design Parking System Leetcode Solution193501Find four elements that sum to a given value (Hashmap)193502Balanced Binary Tree Leetcode Solution193503Postfix to Prefix Conversion193504Pair with given product193505Priority Queue in C++192506Check if a given array contains duplicate elements within k distance from each other192507Find First and Last Position of Element in Sorted Array Leetcode Solution192508Multiply Strings Leetcode Solution192509Shortest Palindrome192510Max Area of Island192511Next Greater Element I Leetcode Solution192512Recursion191513Count and Say Leetcode Solution191514Merge Overlapping Intervals191515Implement a stack using single queue191516Zigzag Conversion LeetCode Solution191517Concatenation of Array LeetCode Solution191518K-th Distinct Element in an Array191520Number of Steps to Reduce a Number to Zero Leetcode Solution190521Minimum Moves to Equal Array Elements Leetcode Solution190522Jump Game Leetcode Solution190523Kids With the Greatest Number of Candies Leetcode Solution190524Next Greater Frequency Element190525Implement Stack using Queues190526The Stock Span Problem190527Longest Common Prefix using Sorting190528Kth Largest Element in a Stream Leetcode Solution190529Check for Balanced Parentheses in an Expression190530Minimum Bracket Reversals189531Count number of triplets with product equal to given number189532Intersection of Two Arrays189533Shuffle an Array188534Move Zeroes LeetCode Solution188535Largest Sum Contiguous Subarray188536Smallest Subarray With all Occurrences of a Most Frequent Element188537Container with Most Water188538Convert array into Zig-Zag fashion188539Peak Index in a Mountain Array188

540Find N Unique Integers Sum up to Zero Leetcode Solution188541Convert a normal BST to Balanced BST187542Mobile Numeric Keypad Problem187543Isomorphic Strings Leetcode Solution187544Last Stone Weight187545Minimum Knight Moves LeetCode Solution187546Valid Sudoku187547Minimum Delete Operations to make all Elements of Array Same186548Contiguous Array Leetcode186549Valid Anagrams186550Delete Node in a Linked List Leetcode Solution186551Distribute Candies to People Leetcode Solution186552Length of Last Word Leetcode Solution186553Change the Array into Permutation of Numbers From 1 to N186554Count the number of nodes at given level in a tree using BFS186555Arrange given numbers to form the biggest number186556Excel Sheet Column Title Leetcode Solution186557Number of Provinces Leetcode Solution185558The Knapsack Problem185559Hamming Distance185560Largest Perimeter Triangle Leetcode Solution185561Maximum sum rectangle in a 2D matrix185562Best Time to Buy and Sell Stock185563Group Multiple Occurrence of Array Elements Ordered by first Occurrence185564Is Subsequence Leetcode Solution185565Sum of Left Leaves Leetcode Solutions185566First negative integer in every window of size k184567Linked List Cycle II LeetCode Solution184568Island Perimeter Leetcode Solution184569Koko Eating Bananas Leetcode Solution184570Gold Mine Problem184571Integer to Roman184572Implementation of Deque using circular array183573How to check if two given sets are disjoint?183574Convert Sorted Array to Binary Search Tree Leetcode Solution1835753Sum Closest LeetCode Solution183576Find Sum of all unique sub-array sum for a given array183577Find Words That Can Be Formed by Characters Leetcode Solution183578Build Array From Permutation Leetcode Solution183579Relative Sort Array Leetcode Solution182580Summary Ranges Leetcode Solution182581Assign Cookies Leetcode Solution182582Maximum path sum in a triangle182583N-th Tribonacci Number Leetcode Solution182584Decode Ways182585Find if an Expression has Duplicate Parenthesis or Not182586Combinations Leetcode Solution18258701 Matrix LeetCode Solution182588Maximum difference between first and last indexes of an element in array182

589Minimum Operations to convert X to Y182590Maximum Distance in Array181591Shortest Path in a Grid with Obstacles Elimination LeetCode Solution181592Jewels and Stones Leetcode Solution181593Sieve of Eratosthenes181594Bubble sort using two Stacks180595Count all subsequences having product less than K180596Minimum number of subsets with distinct elements180597Remove Linked List Elements Leetcode Solution180598Unique Binary Search Trees180599LRU Cache LeetCode Solution180600Find minimum difference between any two elements180601Longest Increasing Subsequence180602Find the smallest positive integer value that cannot be represented as sum of any subset of a given array179603Sort Characters By Frequency LeetCode Solution179604Maximum Number of Occurrences of a Substring Leetcode Solution179605Rotate Image LeetCode Solution179606Rotate List Leetcode Solution179607Insert Interval Leetcode Solution179608Minimum Cost to Hire K Workers178609Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions178610XOR Operation in an Array Leetcode Solution178611Trapping Rain Water LeetCode Solution178612Distance Between Bus Stops Leetcode Solution178613Check if a queue can be sorted into another queue using a stack177614Same Tree LeetCode Solution177615Smallest Good Base177616Remove All Occurrences of a Substring LeetCode Solution177617Iterative Method to find Height of Binary Tree177618Reverse a stack without using extra space in O(n)177619Word Pattern177620How to Create Mergable Stack?177621Word Wrap Problem177622Printing brackets in Matrix Chain Multiplication Problem176623House Robber176624Delete consecutive same words in a sequence176625Non-overlapping sum of two sets176626Minimum insertions to form a palindrome with permutations allowed176627Applications of Breadth First Search and Depth First Search176628Maximum Number of Chocolates to be Distributed Equally Among k Students176629Coin Change Problem176630License Key Formatting Leetcode Solution175631Best Time to Buy and Sell Stock LeetCode Solution175632Permutation in String Leetcode Solution175633Frog Jump Leetcode Solution175634Check If It Is a Straight Line Leetcode Solution175635Minimum number of distinct elements after removing m items175636Isomorphic Strings175637GCD Of Two Numbers175

638Painting Fence Algorithm174639Maximum Consecutive Numbers Present in an Array174640Tracking current Maximum Element in a Stack174641Find the Duplicate Number LeetCode Solution174642Reorganize String174643Stone Game LeetCode174644Reducing Dishes LeetCode Solution174645Merge Two Balanced Binary Search Trees174646Sort Array By Parity LeetCode Solution174647Segregate 0s and 1s in an Array173648Distance of nearest cell having 1 in a binary matrix173649Defanging an IP Address Leetcode Solution173650Strobogrammatic Number LeetCode Solution173651Queries for counts of array elements with values in given range173652K Empty Slots LeetCode173653Wiggle Sort173654Find the Distance Value Between Two Arrays Leetcode Solution173655Replace Elements with Greatest Element on Right Side Leetcode Solution173656Minimum Depth of Binary Tree Leetcode Solution173659Convert an array to reduced form172660Letter Combinations of a Phone Number172661Find Maximum Level sum in Binary Tree172662Flipping an Image LeetCode Solution172663Valid Palindrome II Leetcode Solution172664Form minimum number from given sequence172665Optimal Account Balancing LeetCode Solution172666K Empty Slots172667Partition Labels LeetCode Solution172668Longest Substring with At Most K Distinct Characters LeetCode Solution171669Employee Free Time LeetCode Solution171670Best Time to Buy and Sell Stock with Cooldown Leetcode Solution171671Binary Tree Zigzag Level Order Traversal LeetCode Solution171672Longest Increasing Path in a Matrix LeetCode Solution171673Kth Missing Positive Number Leetcode Solution171674Longest Substring with At Least K Repeating Characters LeetCode Solution171675Moving Average from Data Stream Leetcode Solution171676Reservoir Sampling171677BFS vs DFS for Binary Tree170678Sum of All Odd Length Subarrays Leetcode Solution170679Path With Maximum Minimum Value LeetCode Solution170680First Unique Character in a String LeetCode Solution170681Find the node with minimum value in a Binary Search Tree170682Valid Palindrome170683Valid Perfect Square Leetcode Solution170684Find pairs with given sum such that elements of pair are in different rows170686Inorder Successor of a node in Binary Tree169

687Find Pair with Greatest Product in Array169688Recover Binary Search Tree169689Print the Fibonacci numbers in reverse order169690Find the Smallest Divisor given a Threshold Leetcode Solution169691Count Good Nodes in Binary Tree Leetcode Solution168692Partition Array Into Three Parts With Equal Sum Leetcode Solution168693Subset Sum Leetcode168694Binary Tree zigzag level order Traversal168695Sort Array by Increasing Frequency Leetcode Solution168696To Lower Case Leetcode Solution168697Reverse Only Letters LeetCode Solution168698Number of Dice Rolls With Target Sum LeetCode Solution168699Find Leaves of Binary Tree LeetCode Solution168700Delete Nth node from the end of the given linked list168701Lucky Numbers in a Matrix Leetcode Solution168702Check If Two String Arrays are Equivalent Leetcode Solution168703Unique Paths II Leetcode Solution168704Permutation Sequence LeetCode Solution168705Increasing Decreasing String Leetcode Solution168706Maximum Product of Two Elements in an Array Leetcode Solution168707Find unique character in a string167708String Compression LeetCode Solution167709Check if Two Expressions With Brackets are Same167710Reversing a Queue using Recursion167711Construct BST from given Preorder Traversal167712Convert a Number to Hexadecimal Leetcode Solution167713Remove Invalid Parentheses Leetcode Solution167714Longest Span with same Sum in two Binary arrays167715Edit Distance LeetCode Solution167716Snakes and Ladders LeetCode Solution167717Populating Next Right Pointers in Each Node167718Non-decreasing Array LeetCode Solution167719Dynamic Programming Basics167720Robot Room Cleaner Leetcode Solution167721Minimum Distance Between BST Nodes Leetcode Solution166722Find the largest multiple of 3166723Binary Tree Maximum Path Sum LeetCode Solution166724Majority Element II Leetcode Solution166725String to Integer (atoi) LeetCode Solution166726Maximum Number of Coins You Can Get Leetcode Solution166727Find Maximum Depth of Nested Parenthesis in a String166728Largest subarray with equal number of 0s and 1s166729Factorial Trailing Zeroes Leetcode Solution166730Power of Four Leetcode Solution166731Restore IP Addresses Leetcode Solution165732Add and Search Word – Data structure design LeetCode165733Morris Traversal165734Numbers with prime frequencies greater than or equal to k165

736Find whether an array is subset of another array165737Count quadruples from four sorted arrays whose sum is equal to a given value x165738Minimum Cost For Tickets Leetcode Solution165739Bulb Switcher LeetCode Solution165740Generate all possible sorted arrays from alternate elements of two given sorted arrays165741Ugly Number Leetcode Solution165742Rank Transform of an Array Leetcode Solution165743Maximum Product of Three Numbers LeetCode Solution164744Perform String Shifts Leetcode164745Number of NGEs to the Right164746Merge Two Binary Trees LeetCode Solution164747Race Car LeetCode Solution164748Largest Rectangle in Histogram LeetCode Solution164749Maximum Profit in Job Scheduling Leetcode Solution164750k-th missing element in increasing sequence which is not present in a given sequence164751Print a Binary Tree in Vertical Order164752Growable array based stack163753Finding K closest element163754Regular Expression Matching163755Binomial Coefficient163756Queue based approach for first non-repeating character in a stream163757Tiling Problem163758Find All Duplicates in an Array LeetCode Solution163759Maximum 69 Number Leetcode Solution163760Hamming Distance Leetcode Solution163761Best Meeting Point LeetCode Solution163762Minimize Maximum Pair Sum in Array LeetCode Solution163763Evaluate Reverse Polish Notation LeetCode Solution162764Nested List Weight Sum II LeetCode Solution162766Elements to be added so that all elements of a range are present in array162767Jump Game162768Sorted Linked List to Balanced BST162769Student Attendance Record I Leetcode Solution162770Diagonal Traversal of Binary Tree162771Deletion in a Binary Tree162772Valid Number162773Word Pattern LeetCode Solution162774Find Median from Data Stream LeetCode Solution162775Keyboard Row Leetcode Solution162776Program for Bridge and Torch problem161777Decompress Run-Length Encoded List Leetcode Solution161778Invert Binary Tree LeetCode Solution161779Search in a Binary Search Tree Leetcode Solution161780Count items common to both the lists but with different prices161781Total Numbers With no Repeated Digits in a Range161782Find All Possible Recipes from Given Supplies LeetCode Solution161783Minimum time required to rot all oranges161784Merge K Sorted Linked Lists161

785Minimum Height Trees161786Maximum Depth of N-ary Tree Leetcode Solution161787String comparison containing wildcards161788Merge Sorted Array LeetCode Solution161789Crawler Log Folder Leetcode Solution160790Maximum Length of a Concatenated String with Unique Characters Leetcode Solution160791Subarray Product Less Than K LeetCode Solution160792Base 7 Leetcode Solution160793Symmetric Tree Leetcode Solution160794Check If Array Pairs Are Divisible by k LeetCode Solution160795Maximum Nesting Depth of the Parentheses Leetcode Solution160796Special Array With X Elements Greater Than or Equal X Leetcode Solution160797Check for Palindrome after every character replacement Query160798Kth ancestor of a node in binary tree160799Linked List Cycle160800Top K Frequent Words LeetCode Solution160801One Edit Distance LeetCode Solution160802Find if Path Exists in Graph Leetcode Solution160803Partition to K Equal Sum Subsets Leetcode Solution159804Course Schedule II – LeetCode159805Split a String in Balanced Strings Leetcode Solution159806Circular Queue159807Last Stone Weight II LeetCode Solution159808N-Queens LeetCode Solution159809Longest Subarray Having Count of 1s One More than Count of 0s159810Maximum Difference Between Increasing Elements LeetCode Solution159811Can Place Flowers LeetCode Solution159812Brick Wall LeetCode Solution159813A Space Optimized DP solution for 0-1 Knapsack Problem159814Priority Queue using doubly linked list159815Number of Islands II LeetCode Solution159816Largest rectangular sub-matrix whose sum is 0159817Form Minimum Number From Given Sequence159819Balanced Expression with Replacement158820Check if an Array is Stack Sortable158821Interval Tree158822Final Prices With a Special Discount in a Shop Leetcode Solution158823Minimum sum of multiplications of n numbers158824Sort an array according to the order defined by another array158825Remove Duplicates from Sorted List II158826Transpose Graph158827Number Complement Leetcode Solution158828Minimum Swaps to Make Strings Equal Leetcode Solution158829Remove Duplicates from Sorted List LeetCode Solution158830Iterative Preorder Traversal158831Repeated Substring Pattern LeetCode Solution157832Identify and Mark Unmatched Parenthesis in an Expression157833Minimum swaps to make sequences increasing157

834Partition List Leetcode Solution157835Remove Nth Node From End of List Leetcode Solution157836Minimum Jumps to Reach Home LeetCode Solution157837Nearest Exit from Entrance in Maze LeetCode Solution157838Missing Element in Sorted Array LeetCode Solution157839Search a 2D Matrix II Leetcode Solution157840Binary Search Tree Search and Insertion157841Find Maximum Sum Possible Equal Sum of Three Stacks157842Sort Colors157843Minimum Time Visiting All Points Leetcode Solution157844Matrix Chain Multiplication156845Sort Array By Parity II Leetcode Solution156847Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution156848Permutation Coefficient156849Sorted Array to Balanced BST156850Valid Parentheses Leetcode Solution156851Reorder Data in Log Files LeetCode Solution156852Minimum number of jumps to reach end156853Number of Days Between Two Dates LeetCode Solution156854Check if a given array can represent Preorder Traversal of Binary Search Tree156855Given an Array of Pairs Find all Symmetric Pairs in it155856Alien Dictionary LeetCode Solution155857Maximum size subarray sum equals k155858Convert BST to Min Heap155859Minimum Number of Taps to Open to Water a Garden LeetCode Solution155860Relative Ranks Leetcode Solution155861Find the subarray with least average155862Clone Graph LeetCode Solution155863Range sum queries without updates154864Count Distinct Elements in Every Window of Size K154865Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution154866Find the Only Repetitive Element Between 1 to N-1154867Brightest Position on Street LeetCode Solution154868Sum of nearest smaller and greater number154869Level order Traversal in Spiral Form154870Design a Stack With Increment Operation Leetcode Solution154871Spiral Matrix II Leetcode Solution154872Get Maximum in Generated Array Leetcode Solution154873Path with maximum average value154874Subset with sum divisible by m154875Minimum Sum Path in a Triangle154876Find all triplets with zero sum154877Insert Delete GetRandom154878A program to check if a binary tree is BST or not154879Count ways to reach the nth stair using step 1, 2 or 3154880An Interesting Method to generate Binary Numbers from 1 to n153881Check whether a given Binary Tree is Complete or not153882Subsequence of Size K With the Largest Even Sum LeetCode Solution153

883Distinct adjacent elements in an array153884Design Browser History LeetCode Solution153885Friends Pairing Problem153886Range LCM Queries153887Count Negative Numbers in a Sorted Matrix LeetCode Solution153888Delete And Earn152889Guess Number Higher or Lower II152890Guess Number Higher or Lower LeetCode Solution152891Queue using Stacks152892Averages of Levels in Binary Tree152893Infix to Postfix152894Diagonal Traverse LeetCode Solution152895Check if the given array can represent Level Order Traversal of Binary Search Tree152896Union and Intersection of two Linked Lists152897Check if stack elements are pairwise consecutive152898Insert into a Binary Search Tree Leetcode Solution152899Dividing Array into Pairs With Sum Divisible by K152900Iterative Postorder Traversal Using Two Stacks152901Time Based Key-Value Store LeetCode Solution152902Find Common Characters Leetcode Solution152903Daily Temperatures Leetcode Solution152904Find distance between two nodes of a Binary Tree151905GCDs of given index ranges in an array151906Find all permuted rows of a given row in a matrix151907Lexicographical Numbers Leetcode Solution151908Water Bottles Leetcode Solution1519093 Sum151910Sequences of given length where every element is more than or equal to twice of previous151911K’th Largest Element in BST when modification to BST is not allowed151912Queries for GCD of all numbers of an array except elements in a given range151913Construct Complete Binary Tree from its Linked List Representation151914Robot Bounded In Circle LeetCode Solution151915Rearrange an Array Such that arr[i] is equal to i151916Lemonade Change Leetcode Solution151917BFS for Disconnected Graph150918Shortest Word Distance Leetcode Solution150919Convert Sorted List to Binary Search Tree150920Number of Distinct Islands Leetcode Solution150921Pattern Occurrences using Stack150922Diagonal Traversal LeetCode Solution150924Three way partitioning of an array around a given range150925Least Number of Unique Integers after K Removals Leetcode Solution150926Vertical sum in a given binary tree150927Alien Dictionary150928My Calendar I LeetCode Solution150929Merge Two Sorted Lists Leetcode150930Analyze User Website Visit Pattern LeetCode Solution150931Destination City Leetcode Solution150

932Maximum Score After Splitting a String Leetcode Solution150934Count Subarrays with Same Even and Odd Elements149935Construct the Rectangle Leetcode Solution149936Median of Two Sorted Arrays149937All Unique Triplets that Sum up to a Given Value149938Sliding Window Maximum149939Minimum Height Trees LeetCode Solution149940Reverse Nodes in K-Group149941Rearrange Spaces Between Words Leetcode Solution149942Count subarrays where second highest lie before highest149943Set Matrix Zeroes Leetcode Solution149944Spiral Matrix III LeetCode Solution148945Print Fibonacci sequence using 2 variables148946Count Submatrices With All Ones LeetCode Solution148947Minesweeper LeetCode Solution148948Strongly Connected Component148949Remove Duplicates from Sorted List II LeetCode Solution148950Longest Palindromic Subsequence148951Binary array after M range toggle operations148952Maximize Sum of Array after K Negations Leetcode Solution148953Create Maximum Number148954Maximum Subarray Sum Excluding Certain Elements148955Special Positions in a Binary Matrix Leetcode Solution148956Check if any two intervals overlap among a given set of intervals148957Construct BST from its given Level Order Traversal148958Number of Equivalent Domino Pairs Leetcode Solution148959Product of Array Except Self LeetCode Solution147960Palindrome Partitioning Leetcode Solution147962Maximum Frequency Stack Leetcode Solution147963Climbing stairs147964Trim a Binary Search Tree147965Depth First Search (DFS) for a Graph147966Can Make Arithmetic Progression From Sequence Leetcode Solution147967Binary Tree Longest Consecutive Sequence LeetCode Solution1479684Sum147969Unique Paths II146970Merging Intervals146971Three Consecutive Odds Leetcode Solution146972Combination Sum IV LeetCode Solution146973Split Array Into Consecutive Subsequences146974Intersection of Two Linked Lists LeetCode Solution146975Symmetric Tree145976Breadth First Search (BFS) for a Graph145977Design Hit Counter LeetCode Solution145978Length of Longest Fibonacci Subsequence145979Palindrome Partitioning145980Serialize and Deserialize Binary Tree145

981Stone Game II Leetcode145982Merge Sort145983Find Maximum of Minimum for Every Window Size in a Given Array145984Count Primes in Ranges145985Maximum Product Subarray145986Kth Smallest Element in a BST Leetcode Solution144987Valid Boomerang Leetcode Solution144988Word Break144989Largest divisible pairs subset144990Check If a Word Occurs As a Prefix of Any Word in a Sentence Leetcode Solution144991Binary Search Tree Delete Operation144992Segment Tree144993Longest subsequence such that difference between adjacents is one144994Count pair with Given Sum143995Height of a generic tree from parent array143996Find the Difference Leetcode Solution143997Find the First Circular Tour that visits all the Petrol Pumps143998Shuffle 2n integers as a1-b1-a2-b2-a3-b3-..bn without using extra space143999Sign of the Product of an Array LeetCode Solution1431000Collect maximum points in a grid using two traversals1431001String Matching in an Array Leetcode Solution1431002Insertion in a Binary Tree1431003Level Order Traversal of Binary Tree1431004Maximum length subsequence with difference between adjacent elements as either 0 or 11431005Asteroid Collision LeetCode Solution1431006Number Of Longest Increasing Subsequence1431007Largest Substring Between Two Equal Characters Leetcode Solution1431008Boundary Traversal of binary tree1431009The Painter’s Partition Problem1431010Find Duplicate Subtrees1421011Maximum Length of Repeated Subarray1421012Iterative Depth First Traversal of Graph1421013Number of palindromic paths in a matrix1421014Shortest Completing Word Leetcode Solution1421015Validate Binary Search Tree1421016Level order traversal using two Queues1421018Find number of pairs in an array such that their XOR is 01421019Maximum subsequence sum such that no three are consecutive1421020Graph Valid Tree LeetCode Solution1421021Find postorder traversal of BST from preorder traversal1421022Minimum Index Sum of Two Lists1421023Newman-Conway Sequence1421024The Maze III LeetCode Solution1421025Print Next Greater Number of Q queries1411026Rearrange array such that even positioned are greater than odd1411027Maximum Product of Indexes of Next Greater on Left and Right1411028Print Right View of a Binary Tree1411029Advantages of BST over Hash Table141

1030Binary Search Tree1411031Decrypt String from Alphabet to Integer Mapping Leetcode Solution1411032Maximum Number of Ways to Partition an Array LeetCode Solution1411033Maximum Sum of 3 Non-Overlapping Subarrays1411034Compute nCr % p1411035Kill Process LeetCode Solution1411036Balanced Binary Tree1411037Longest Nice Substring LeetCode Solution1411038Largest Number Leetcode Solution1411039First missing positive1411040Next Permutation Leetcode Solution1411041K Closest Points to Origin Leetcode Solution1411042Scramble String LeetCode Solution1411043Boolean Parenthesization Problem1411044Friends Of Appropriate Ages LeetCode Solution1401045Minimum Size Subarray Sum1401046Construct Binary Tree from given Parent Array representation1401047Maximum weight transformation of a given string1401048Build an Array With Stack Operations Leetcode Solution1401049Ugly Numbers1401050Next Greater Element III LeetCode Solution1401051Rearrange array such that even index elements are smaller and odd index elements are greater1401052Consecutive Characters LeetCode Solution1391053Kth Smallest Element in a Sorted Matrix LeetCode Solution1391054Make The String Great Leetcode Solution1391055K maximum sums of overlapping contiguous sub-arrays1391056Find a Peak Element II LeetCode Solution1391057Lowest Common Ancestor1391058Regular Expression Matching Regular Expression Matching LeetCode Solution1391060Partition Equal Subset Sum1391061Invalid Transactions LeetCode Solution1391062Count pairs from two sorted arrays whose sum is equal to a given value x1391063Morris Inorder Traversal1381064Move all negative elements to end in order with extra space allowed1381065Count minimum steps to get the given desired array1381066Custom Sort String Leetcode Solution1381067Add two numbers1381068Path Sum II LeetCode Solution1381069Available Captures for Rook Leetcode Solution1381070Ugly Number II LeetCode Solution1381071Double the first element and move zero to end1381072Super Ugly Number1381073Remove Duplicates from Sorted Array II Leetcode Solution1381074Populating Next Right Pointers in Each Node Leetcode Solution1381075Generate Parentheses Leetcode Solution1371076Search in Sorted Rotated Array1371077Number of siblings of a given Node in n-ary Tree1371078Employee Importance LeetCode Solution137

1079Types of Binary Tree1371080Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution1371081Bitwise AND of Numbers Range LeetCode Solution1371082Valid Tic-Tac-Toe State LeetCode Solution1371083Recover Binary Search Tree Leetcode Solution1371084Maximum difference between frequency of two elements such that element having greater frequency is also greater1371085Find whether a subarray is in form of a mountain or not1371086Path Sum1371087Divisible Pairs Counting1371088Defanging an IP Address LeetCode Solution1371090Remove Palindromic Subsequences Leetcode Solution1361091Binary Tree Right Side View LeetCode Solution1361092Queries for Number of Distinct Elements in a Subarray1361093Maximize Distance to Closest Person LeetCode Solution1351094Serialize and Deserialize Binary Tree LeetCode Solution1351095Largest BST Subtree LeetCode Solution1351096Binary Tree Data Structure1351097Subarrays with K Different Integers Leetcode Solution1351098Increasing Triplet Subsequence LeetCode Solution1351099Kth Smallest Product of Two Sorted Arrays LeetCode Solution1351100Number of Closed Islands Leetcode Solution1351101Distinct Subsequences1351102Day of the Year Leetcode Solution1351103Find the minimum distance between two numbers1351104Print all triplets in sorted array that form AP1351105Longest Bitonic Subsequence1351106Find Peak Element1351107Number of Students Doing Homework at a Given Time Leetcode Solution1341108Level of Each node in a Tree from source node1341109Palindrome Permutation LeetCode Solution1341110Clone a Binary Tree with Random Pointers1341111Find Smallest Range Containing Elements from k Lists1341112Longest Increasing Consecutive Subsequence1341113Smallest Common Region Leetcode Solution1341114Convert BST into a Min-Heap without using array1341115Root to Leaf path with target sum Leetcode Solutions1341116Third Maximum Number Leetcode Solution1331117Find maximum difference between nearest left and right smaller elements1331119Cutting a Rod1331120Search Insert Position1331121Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution1331122Remove duplicates from sorted array1331123Count Largest Group Leetcode Solution1331124Products of ranges in an array1321125Bottom View of a Binary Tree1321126Sum of Even Numbers After Queries1321127Print modified array after executing the commands of addition and subtraction132

1128Mean of Array After Removing Some Elements Leetcode Solution1321129Write Code to Determine if Two Trees are Identical1321130Minimum sum of squares of character counts in a given string after removing k characters1321131Reformat The String Leetcode Solution1321132Iterative method to find ancestors of a given binary tree1321133Maximum Product Subarray1311134Thousand Separator Leetcode Solution1311135Prime Palindrome LeetCode Solution1311136Constant time range add operation on an array1311137Cells with Odd Values in a Matrix LeetCode Solution1311138Construct K Palindrome Strings LeetCode Solution1311139Topological Sorting1311140Minimum Absolute Difference in BST Leetcode Solution1311141Count even length binary sequences with same sum of first and second half bits1301142Palindromic Substrings Leetcode Solution1301143Red-Black Tree Introduction1301144Moser-de Bruijn Sequence1301145Possible Bipartition LeetCode Solution1301146Delete Nodes and Return Forest Leetcode Solution1301147Search an Element in Sorted Rotated Array1301148Priority Queue1301149Swap Nodes In Pairs1301150Longest Subarray of 1’s After Deleting One Element LeetCode Solution1301151Minimum Score Triangulation of Polygon Leetcode Solution1301152Closest Binary Search Tree Value Leetcode Solution1291153Diameter of N-Ary Tree LeetCode Solution1291154Merge two BSTs with limited extra space1291155Check Array Formation Through Concatenation Leetcode Solution1291156Golomb sequence1291157Maximum Product of Splitted Binary Tree LeetCode Solution1291158Transform a BST to Greater sum Tree1291159Binary Tree to Binary Search Tree Conversion1291160Rotate Array1291161Decision Tree1291162Minimum Cost to Move Chips to The Same Position LeetCode Solution1291163Find maximum length Snake sequence1291164Maximum Binary Tree1291166Count Pairs Whose Products Exist in Array1281167Subset Sum Problem in O(sum) space1281168Maximize sum of consecutive differences in a circular array1281169Bus Routes Leetcode Solution1281170Kth Smallest Number in Multiplication Table Leetcode Solution1281171Compare Strings by Frequency of the Smallest Character Leetcode Solution1281172Factorial Trailing Zeroes LeetCode Solution1271173Minimum Sideway Jumps LeetCode Solution1271174Reverse a Path in BST using Queue1271175K’th Largest element in BST using constant extra space1271176Longest Repeated Subsequence127

1177Remove Max Number of Edges to Keep Graph Fully Traversable Leetcode Solution1271178Contiguous Array LeetCode Solution1271179Web Crawler LeetCode Solution1271180Search Suggestions System LeetCode Solution1271181Find a sorted subsequence of size 3 in linear time1261183First Bad Version1261184Find Largest Value in Each Tree Row LeetCode Solution1261185Find the smallest binary digit multiple of given number1251186Reformat Date LeetCode Solution1251187Closest Leaf in a Binary Tree LeetCode Solution1251188Number of Orders in the Backlog Leetcode Solution1251189Lowest Common Ancestor in Binary Search Tree1251190Valid Triangle Number1251191Maximum Depth Of Binary Tree1251192Matchsticks to Square Leetcode Solution1251193Decrease Elements To Make Array Zigzag LeetCode Solution1251194Graph and its representation1241195Swapping Nodes in a Linked List Leetcode Solution1241196Minimum Swaps To Make Sequences Increasing LeetCode Solution1241197Queue Reconstruction by Height1241198Sum of Left Leaves LeetCode Solution1241199New 21 Game1241200Valid Perfect Square LeetCode Solution1241201Concatenation of Array LeetCode Solution1241202Array Queries for multiply replacements and product1241203Maximum number of segments of lengths a, b and c1241204Convert Sorted Array to Binary Search Tree LeetCode Solutions1241205How to print maximum number of A’s using given four keys1241206Minimum Moves to Equal Array Elements LeetCode Solution1241207Guess The Word1241208Moving Stones Until Consecutive Leetcode Solution1231209Replace two consecutive equal values with one greater1231210Maximum sum bitonic subarray1231211Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution1231212Divide Two Integers Leetcode Solution1221213Maximum sum of pairs with specific difference1221214Path Crossing Leetcode Solution1221215Print n terms of Newman-Conway Sequence1221216Write a function to get the intersection point of two Linked Lists1221217Missing Number1221218Range Sum Query using Sparse Table1221219Range Queries for Longest Correct Bracket Subsequence1221220Queries on Probability of Even or Odd Number in given Ranges1221221Champagne Tower LeetCode Solution1221222Lowest Common Ancestor of a Binary Tree Leetcode Solution1211223BST to a Tree with Sum of all Smaller Keys1211224Kth Smallest Element in a BST1211225Maximum sum of a path in a Right Number Triangle121

1226Maximum Value at a Given Index in a Bounded Array LeetCode Solution1211227Perfect Squares LeetCode Solution1211228Integer Break LeetCode Solution1201229Graph Cloning1201230Convert Integer to the Sum of Two No-Zero Integers Leetcode Solution1201231Longest Common Prefix Using Word by Word Matching1201232Print modified array after multiple array range increment operations1201233Mean of range in array1201234Largest Plus Sign Leetcode Solution1201235Flatten 2D Vector LeetCode Solution1201236Merge k Sorted Lists Leetcode Solution1191237Sliding Window Median Leetcode Solution1191238Arithmetic Slices II – Subsequence LeetCode Solution1191239LRU Cache Leetcode Solution1191240Check if all levels of two Binary Tree are anagrams or not1191241Power of Two1191242Count Subsets Having Distinct Even Numbers1181243Check if each internal node of a BST has exactly one child1181244Bold Words in String LeetCode Solution1181245Check for Identical BSTs without building the trees1181246Maximum Array from Two given Arrays Keeping Order Same1181247Check Completeness of a Binary Tree LeetCode Solution1181248Design Skiplist LeetCode Solution1181249Minimum Remove to Make Valid Parentheses LeetCode Solution1171250Contiguous Array1171251Find minimum number of merge operations to make an array palindrome1171252Maximize Elements Using Another Array1171253The kth Factor of n Leetcode Solution1171254Parallel Courses II LeetCode Solution1171255Symmetric Tree LeetCode Solution Leetcode Solution1171256Min Cost Climbing Stairs LeetCode Solution1161257Find Minimum in Rotated Sorted Array II LeetCode Solution1161258Image Overlap LeetCode Solution1161259Print Ancestors of a Given Binary Tree Node Without Recursion1161260Maximum Sum Increasing Subsequence1161261Verify Preorder Serialization of a Binary Tree1161262Next greater element1151264Excel Sheet Column Title LeetCode Solution1141265Minimum Time to Collect All Apples in a Tree LeetCode Solution1141266Maximum Product Subarray1141267Orderly Queue LeetCode Solution1141268Count and Toggle Queries on a Binary Array1141269Smallest Range II Leetcode Solution1141270Different Ways to Add Parentheses Leetcode Solution1131271Palindrome Partitioning1131272Check in binary array the number represented by a subarray is odd or even1131273Check if two nodes are on the same path in a Tree1131274Check If a String Can Break Another String Leetcode Solution112

1275Merge Sorted Array1111276Koko Eating Bananas LeetCode Solution1111277Number of elements less than or equal to a given number in a given subarray1101278Array Nesting Leetcode Solution1101279Find maximum average subarray of k length1091280Largest Submatrix With Rearrangements LeetCode Solution1091281Longest Substring Without Repeating Characters Leetcode Solution1091282Peeking Iterator LeetCode Solution1091283Check if X can give change to every person in the Queue1091284Newman–Shanks–Williams prime1091286Check given array of size n can represent BST of n levels or not1071287Queries for Decimal Values of Subarrays of a Binary Array1071288Encoded String With Shortest Length LeetCode Solution1061289Arranging Coins Leetcode Solution1061290Number of indexes with equal elements in given range1051291Maximum product of an increasing subsequence1051292Palindrome Number LeetCode Solution1051293Vertical Order Traversal of Binary Tree LeetCode Solution1041294Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution1041295Find the Winner of the Circular Game LeetCode Solution1041296Random Pick Index LeetCode Solution1041297Binary Tree to Binary Search Tree Conversion using STL set1031298Jump Game IV LeetCode Solution1031299Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1031300Add Two Numbers II Leetcode Solution1031301Minimum Number of People to Teach LeetCode Solution1021302Minimum Total Space Wasted With K Resizing Operations LeetCode Solution1021303Reach a Number LeetCode Solution1021304Convert to Base -2 LeetCode Solution1011305Queries on XOR of greatest odd divisor of the range1011306Insert Delete GetRandom O(1) Leetcode Solution1011307Continuous Subarray Sum LeetCode Solution1011308Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution1001309Print Maximum Length Chain of Pairs961310Design Underground System Leetcode Solution961311Shifting Letters LeetCode Solution931312Detect Capital Leetcode Solution931313Design A Leaderboard Leetcode Solution931314Minimum Path Sum Leetcode Solution881315Substring with Concatenation of All Words Leetcode Solution881316Count Sub Islands LeetCode Solution871317Top K Frequent Elements LeetCode Solution871318Minimum Swaps to Group All 1’s Together Leetcode Solution861319Odd Even Linked List Leetcode Solution841320Binary Tree Inorder Traversal LeetCode Solution841321Longest Common Subsequence LeetCode Solution831322Maximum Population Year LeetCode Solution821323Decode String Leetcode Solution81

1324Best Meeting Point LeetCode Solution811325Find the Town Judge LeetCode Solution811326Find the Town Judge LeetCode Solution801327Shortest Unsorted Continuous Subarray LeetCode Solution781328Sum Root to Leaf Numbers LeetCode Solution771329Rectangle Overlap LeetCode Solution761330Maximum Population Year LeetCode Solution741331Design Add and Search Words Data Structure LeetCode Solution741332Flatten Binary Tree to Linked List LeetCode Solution731333Score of Parenthesis LeetCode Solution721334Stone Game IV LeetCode Solution721335Insert into a Sorted Circular Linked List LeetCode Solution711336Range Sum Query 2D – Immutable LeetCode Solution701337Is Graph Bipartite? LeetCode Solution701338Valid Triangle Number LeetCode Solution691339Reveal Cards In Increasing Order Leetcode Solution671340Divide Chocolate LeetCode Solution601341Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution541342Range Sum of BST LeetCode Solution501343Find K Closest Elements LeetCode Solution481344Reverse Integer Leetcode Solution471345Sort Colors LeetCode Solution441346Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution431347Excel Sheet Column Number LeetCode Solution421348Rotate String LeetCode Solution421349Monotonic Array Leetcode Solution271350Maximum Size Subarray Sum Equals k Leetcode Solution231351Most Stones Removed with Same Row or Column LeetCode Solution221352H-Index Leetcode Solution221353High Five LeetCode Solution221354Camelcase Matching Leetcode Solution221355Container With Most Water LeetCode Solution211356Sliding Window Maximum LeetCode Solution201357Valid Anagram Leetcode Solution201358Find Peak Element LeetCode Solution201359Next Permutation LeetCode Solution191360Paint House LeetCode Solution181361Group Anagrams LeetCode Solution181362Flatten Binary Tree to Linked List LeetCode Solution181363Binary Search LeetCode Solution181364Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution181365Next Greater Element I Leetcode Solution171367Unique Binary Search Trees LeetCode Solution161368Isomorphic Strings LeetCode Solution161369Valid Triangle Number LeetCode Solution161370Group Shifted Strings Leetcode Solution161371Closest Binary Search Tree Value II LeetCode Solution151372Sentence Screen Fitting LeetCode Solution15

1373Minimum Number of Arrows to Burst Balloons LeetCode Solution151374Peak Index in a Mountain Array LeetCode Solution151375Swim in Rising Water LeetCode Solution14