Problems
July 11, 2022
Binary tree right side view
This problem asked us to return the list of the nodes when we look it from the right side. That means, if we traverse the whole tree with BFS, we will see the right side node of the tree in each...
ReadJuly 11, 2022
Max area of island
This is a classing grid graph problem. We will iterate through each row and column, when we find a new land, we will then expand the area of land sorrounding. We can use BFS or DFS to do that. I will...
ReadJuly 10, 2022
Contains duplicate
We are given a list of integers. We have to find out whether we have any duplicate or not. We can store the elements in a hashset while iterating through the list. We the item is already present in...
Read