Puzzle
BAN USER
- 0of 0 votes
AnswersGiven a doubly linked list containing only three integers 1,2,3. Sort the list without exchanging the values.
- Puzzle in India
Eg- 1->3->2->1->2->3->2->1->1
output: 1->1->1->1->2->2->2->3->3| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Data Structures Linked Lists - 0of 0 votes
AnswersGiven a Binary tree where nodes may have positive or negative value, store the sum of the left and right subtree in the nodes.
Eg-10 -2 6 8 -4 7 5
Output:
- Puzzle in India20(-2+6+4+12) 4(8-4) 12(7+5) 0 0 0 0
| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Trees and Graphs Data Structures
What i did is i first sorted the number in increasing order. Say the sorted one is n and original is o.
Then starting from end,replacing the last digit of n with second last. Then checking it with original o. If its greater, then we have the solution.
Repeating this till the first digit of sorted n is replaced with second digit.
eg- o=15432, n=12345.
n= 12354,12435,13245,21345 (answer)
RepDo you Need Voodoo Spell For love, revenge or voodoo spells for cheaters? Consult Free right away to get custom ...
RepElenaKudaeva455, Music Piano Store at xyz
Hello Everyone,My name is Elena Kudaeva From NV,Nevada,USA.I am 16 years of age and I have ...
Repadorasherlyn253, SEO
I am a professor, I have 5 years of experience. I have seen a lot of cases in my life ...
RepEdwin Adcox, Dev Lead at Advisory Board Company
Welcome to the best and certified exotic car rental company of USA. Here, at Prestige luxury Rentals, we offer the ...
RepWilliamDGiles, Cloud Support Associate at ADP
Spent 2001-2006 creating marketing channels for tar worldwide. Was quite successful at building tobacco for farmers. Won several awards for ...
RepGet boyfriend back by vashikaran mantra. Astrologer Guru ji is the best black magic and vashikaran specialist. He offers instant ...
Repnormadyen, Blockchain Developer at 247quickbookshelp
I am working as a Pharmacy technician in Sunny Sypus company. I can maintain employee records for a company or ...
RepRocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
RepSCREENish employee time tracking software can be used as desktop or mobile app. Once the employee has tracked his working ...
RepNY Vape Shop is the most popular Vaporizer Store for new trend vaporizer pen and all related accessories. We are ...
Duplicate for qns 11561969
- Puzzle November 26, 2011