Enigma8ic
BAN USER
Questions (2)
Comments (2)
Reputation 10
- 0of 0 votes
AnswersWhat is a stack? What operations can be performed on it?
- Enigma8ic in United States
Implement a stack data structure.| Report Duplicate | Flag | PURGE
Amazon SDET Data Structures - 0of 0 votes
AnswersImplement a datastructure with the following APIs
- Enigma8ic in United States
void add(int) - 3,12,5,6,1
int getMin() - 1,3,5,6,12| Report Duplicate | Flag | PURGE
Amazon SDET Data Structures
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Python 3:
def orderly_count(let_string):
mapping = {}
for item in let_string:
mapping[item] = mapping.get(item,0)+1
result = ''
for item in let_string:
if item not in result:
result += item + str(mapping[item])
return result
print(orderly_count('abbaccdbac')) #a3b3c3d1
print(orderly_count('bbddeeeaaccbbdef')) #b4d3e4a2c2f1
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Python 3:
- Enigma8ic June 01, 2016