sidhartha.mahapatro
BAN USER
Comments (5)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
This approach will fail if all are dupilicate. Then result will be O(nXn).
- sidhartha.mahapatro May 19, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
Awesome! Thanks for the elegant code snippet.
- sidhartha.mahapatro February 27, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
WOW.. Appreciated. Good logic.
If anybody publish some code then that will really help.
Comment hidden because of low score. Click to expand.
0
of 0 vote
WOW.. Appreciated. Good logic.
If anybody publish some code then that will really help.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
O(n) - Solution
- sidhartha.mahapatro March 13, 2021def Reverse(lst):
return [ele for ele in reversed(lst)]
plist = [0]
rlist = []
for i in range(1,11):
plist.append(i)
if (i != 10):
rlist.append(i)
plist.extend(Reverse(rlist))
print(plist)