Second largest number in array in Java
In this Post, I am going to discuss how to find the second largest number in array in java. So, without wasting time, let’s start I am going to discuss the problem by using Java…
In this Post, I am going to discuss how to find the second largest number in array in java. So, without wasting time, let’s start I am going to discuss the problem by using Java…
So, In this post, we are going to discuss the program and algorithm of anagram In C/C++/Java. What matters is only the algorithm, If you better understand the Algorithm you can code in any language…
This is another editorial post of the codeforce problem Basketball Exercise. Detailed BasketBall Exercise Editorial The problem is basically a DP problem where we have the choice to choose such that no consecutive chosen students…
In the previous post, we discussed Topological Sorting and in this post, we are going to discuss two problems based on topological sort in c++. So, let’s start. Leetcode 210 : Course Schedule II There…
In the previous post, we have already discussed the map-based solution of the problem clone a link list with next and random pointer. The map-based solution took O(n) extra space but in this post, we…
Leetcode Problem 138 A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. We need to clone-a-linked-list-with-next-and-random-pointer. Read rat in…
Problem Statement of rat in a maze problem The problem is a rat in a maze problem. Consider a rat placed at (0, 0) in a square matrix of order N*N. It has to reach the destination at (n-1,…
Today we are going to discuss a trending Algorithm that is used frequently for solving problems the “Two Pointer Algorithm“. In this post, we will first understand the Two Pointer Algorithm and then we will…
Today I am going to discuss two Tree Data Structure Problems, from the first sub tree sum problem we will learn some new concepts, and then we will use that concept to solve another problem….
In this post, we will discuss two famous interview problems, Duplicate Number and Missing Number. From the first problem we will learn some concepts, and then we will apply it to solve a Leetcode hard…