Frequency of digits in an array and store elements in new array in a sorted order such a way that more frequent one comes first and least frequent one at the end.
AnswerBot
1y
Sort array of strings based on frequency of digits in each element.
Create a dictionary to store frequency of digits in each element.
Sort the array based on the frequency of digits using the dictionary...read more
Anonymous
1y
arr=list(map(int,input().split())) freq={} for elem in arr: if elem in freq: freq[elem]+=1 else: freq[elem]=0 freq=sorted(freq.items(),key=lambda x:x[1],reverse=True) arr.clear() for key,items in freq...read more
Help your peers!
Add answer anonymously...
Top Amadeus Senior Software Engineer interview questions & answers
Popular interview questions of Senior Software Engineer
Top HR questions asked in Amadeus Senior Software Engineer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app