ProDeveloperTutorialonDecember 24, 2024 Sort Colors In Place We can solve this by many different ways. Solution 1 Will be counting all the number of 0’s, 1’s and 2’s. Then insert those number of… Discover More
ProDeveloperTutorialonDecember 24, 2024 Search a 2D Matrix in C++ Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are… Discover More
ProDeveloperTutorialonDecember 24, 2024 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] Example 2: Input: [ [0,1,2,0], [3,4,5,2], [1,3,1,5] ]… Discover More
ProDeveloperTutorialonDecember 24, 2024 Jump Game II in CPP Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents… Discover More
ProDeveloperTutorialonDecember 24, 2024 Simplify Path CPP Given an absolute path for a file (Unix-style), simplify it. For example, path = “/home/”, => “/home” path =… Discover More
ProDeveloperTutorialonDecember 24, 2024 Minimum Path Sum in CPP Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along… Discover More
ProDeveloperTutorialonDecember 24, 2024 Unique Paths II in CPP Problem Explanation: A robot is located at the top-left corner of a m x n grid. The robot can only move either down or right at any point in… Discover More
ProDeveloperTutorialonDecember 24, 2024 Unique Paths Solution in CPP A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either… Discover More
ProDeveloperTutorialonDecember 24, 2024 Rotate linked list by k nodes Example 1: Input: 1->2->3->4->5->NULL, k = 2 Output: 4->5->1->2->3->NULL Explanation: rotate 1 steps to the… Discover More
ProDeveloperTutorialonDecember 24, 2024 Intersection of Two Linked Lists in c++ Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A:… Discover More