The longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.For example, length of LIS
… Read More Practo Hiring Experience
Started from Written Test on HackeEarth1) http://www.hackerearth.com/problem/algorithm/divide-to-three-33/
Code Solution Click : http://ideone.com/7M1o9j
2) http://www.hackerearth.com/problem/algorithm/good-times-vs-bad-times-3/
Code Solution Click : http://ideone.com/xj7o49
… Read More Code Solution Click : http://ideone.com/7M1o9j
2) http://www.hackerearth.com/problem/algorithm/good-times-vs-bad-times-3/
Code Solution Click : http://ideone.com/xj7o49
Level order traversal in Spiral form
Write a function to print spiral order traversal of a tree or Write function for Tree traversal in Spiral ZigZag form
For below tree, function should print 1, 2, 3, 7, 6, 5, 4.
For below tree, function should print 1, 2, 3, 7, 6, 5, 4.
[1]
Maximum of all subarrays of size k
Given an array and an integer k, find the maximum for each and every contiguous subarray of size k.
Input :
arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}
k = 3
… Read More Input :
arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}
k = 3
In Given LinkedList Divide LL in N Sub parts and delete first K nodes of each part
Given LinkedList and K=2, N=41->2->3->4->5->6->7->8->9
so Partitioned LinkedList will be
1->2->3->4->5->6->7->8->9
Now delete first K nodes from each subpart and return
Possible sizes of bus to carry n groups of friends
There are n groups of friends, and each group is numbered from 1 to n. The ith group contains ai people.
They live near a bus stop, and only a single bus operates on this
N teams are participating. each team plays twice with all other teams. Some of them will go to the semi final. Find Minimum and Maximum number of matches that a team has to win to qualify for finals ?
Consider above question with specific input.
Consider a series in which 8 teams are participating. Each team plays twice with all other teams.
4 of them will go to the semi final.
Minimum and Maximum
… Read More Consider a series in which 8 teams are participating. Each team plays twice with all other teams.
4 of them will go to the semi final.
Minimum and Maximum
Find two non repeating elements in an array of repeating elements
Given an array in which all numbers except two are repeated once.
(i.e. we have 2n+2 numbers and n numbers are occurring twice and remaining two have occurred once).
Find those two numbers in the
… Read More (i.e. we have 2n+2 numbers and n numbers are occurring twice and remaining two have occurred once).
Find those two numbers in the
Amazon Interview Experience – SDE Chennai
Recently I have participated in Amazon SDE interview for Chennai location Kindle team.
Kindle team has arrived Bangalore location to take drive.
I have given 8 rounds
Questions- Answers are as below
… Read More Kindle team has arrived Bangalore location to take drive.
I have given 8 rounds
Questions- Answers are as below
R-1) Written Test
HackeEarth Flipkart’s Drone
HackeEarth Flipkart’s Drone : After listening to the news of testing of Delivery Drone
But this was only possible if two of the shipping addresses had “V1-type” road connecting them(V1-type roads are the fastest in
… Read More But this was only possible if two of the shipping addresses had “V1-type” road connecting them(V1-type roads are the fastest in