ProDeveloperTutorialonJanuary 19, 2025 Greedy: Remove overlapping intervals. Problem Statement: You are given an array of intervals [start, end]. You need to return minimum number of intervals to remove to make the rest…
ProDeveloperTutorialonJanuary 19, 2025 Greedy: Check if the string is a substring of another string Problem Statement: You are given 2 strings s, t. You need to check if s is a substring of t. A substring of a string is a new string that is…
ProDeveloperTutorialonJanuary 19, 2025 Greedy: Get the minimum platforms needed to avoid delay in the train arrival. Problem Statement: You are given an array of arrival and departure timings for train at a station. You need to find the minimum umber of…
ProDeveloperTutorialonJanuary 19, 2025 Greedy: Remove k digits from an number to make it a smallest integer. Problem Statement: You are given a number and integer k. You need to remove k digits from the number and it should return the smallest integer…
ProDeveloperTutorialonJanuary 19, 2025 Greedy: Add elements in an array so the sum is equal to the given range Problem Statement: You are given sorted array, and an integer K. You need to add elements in such a way that any number in the range [1, k]…
ProDeveloperTutorialonJanuary 19, 2025 Greedy: Remove duplicates from a string Problem Statement: You are given a string s, you need to remove duplicate letters so that every letter should appear only once. The result…
ProDeveloperTutorialonJanuary 19, 2025 Binary Search Trees: Flatten BST to sorted list Problem Statement: You are given a root of a binary tree. You need to flatten into a sorted list. Solution We need to do inorder traversal.…
ProDeveloperTutorialonJanuary 19, 2025 Binary Search Trees: Correct a BST where 2 nodes are swapped Problem Statement: You are given a root node of a binary search tree where 2 nodes are swapped. You need to correct the BST and return it.…
ProDeveloperTutorialonJanuary 19, 2025 Binary Search Trees: Check if the BST has a dead end Problem Statement: You are given a root node of a BST. You need to check if it has a dead end or not. A dead end is a node, where you will not…
ProDeveloperTutorialonJanuary 19, 2025 Binary Search Trees: Check if the pre-order is a valid BST Problem Statement: You are given an array of integers in pre-order fashion. Then you need to check if it is a valid BST. Solution pre-order…