Do:
1.Find MostSignificantBit(MSB) position in O(1)
Input:10(1010)
Output:3
2. Given a stream of elements,get the minimum element for every removal of last element in given stream.
Input1: 1 2 3 4 5
Output1: -1 1 1 1 1
Input2: 5 4 3 2 1
Output2: -1 5 4 3 2
3.LinkedList based problem:
Given a sorted collection of nodes connected by a link,remove the duplicate nodes(with out using extra space O(1))
Input:
5->5->7->7->7->9>10->11
Output:
5->7->9->10->11
4.Graph based problem:
Given an unweighted graph,source point and destination point,we need to find the shortest path from source to destination in the graph.
Input:
Output:Shortest path length is 2.from 0 node to 7 node(0->3->7)
5.Tree based problem:
Given an undirected Acyclic graph,2 nodes in a graph,we need to find LowestCommonAncestor for given 2 nodes.
Input:
Note:Answers will reveal by 6PM,but think(in optimal way) the problem statements before revealing.
------------------------------------------------------------------------------
HealthTips:
--------Help stop coronavirus
STAY HOME ,BE SAFE
---YOUR BRIGHT FUTURE WAITING FOR YOU.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Motivation For The Day
"It doesnot matter where you are coming from All that matters is where you are going."
Note:
We Are Providing Every Content in this Blog Inspired From Many People and Provide it Open To All People Who Are Willing Gain Some Stuff in Computer Science.