mani0119
BAN USER
- 4of 4 votes
AnswersAll jumbled numbers of n digits in max (worst case) O(n) and min (avg case) O(log n) time.
- mani0119 in India
A number is a jumbled number if the _absolute_ difference between adjacent digits is <=1.
For an input n=3
output should be
100
101
110
111
121
122
...
and so on.
The problem is similar to the one listed here https://www.careercup.com/question?id=5729332770111488
But this problem also has a O(n or log n) limitation and the solutions listed in the above mentioned problem at the time of posting this question, do not satisfy the criteria
PS: 001 is not a 3 digit number.
210 is absolutely fine as the absolute difference between adjacent digits is <=1.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm
Repsochnimrana138, Animator at ABC TECH SUPPORT
I am TroyMitchell . I am working in Rhodes Furniture as a machine operator . I have excellent experience in cutting , punching ...
RepSusanHonda, Analyst at A9
I meet with clients to negotiate terms and prices on sales agreements, draw up the contract, and ensure the documents ...
Repednaheeks, Android test engineer at Automated Traders Desk
I am Edna, a blogger . As an editor with a strong background in English and Hindi language. I enjoy writing ...
RepVealeJasso, Backend Developer at 247quickbookshelp
I am Veale, Learning and development manager handling the training and professional development of company employees. I love makeup, cats ...
RepOliviaJBlack, Consultant at Apkudo
I am Olivia from San Diego. I am working as a checker in the Thom McAn Store company. My strong ...
RepIsabellaRoy, Android Engineer at 8x8
I have excellent reporting and interviewing skills and award-writing techniques. I compose a variety of stories for print news and ...
Repwilliamland1990, Associate at Advent
Gifted in donating shaving cream worldwide. Crossed the country getting my feet wet with the elderly in Salisbury, MD. Have ...
RepMarlinThomas, Backend Developer at ASAPInfosystemsPvtLtd
I am Marlin, an industrial maintenance mechanic. I can help you create a job listing. Feel free to revise, add ...
Reprmansummers, Accountant at Alcatel Lucent
I'm Rman! I graduated from the University of Arizona with a Bachelor's degree in Psychology and Education. I ...
RepNancy , a Homemaker manages the household of the various families. I love to explore astrology so I recently took help ...
RepGladysHenley, Blockchain Developer at ASU
Gladys , a Staffing Consultant adept at managing the whole lifecycle of candidate recruitment, organizing job fairs, workshops, and webinars, and ...
Replleongardner, Animator at 247quickbookshelp
I am a writer and television producer living in the Corpus Christi area. I have always been fascinated by the ...
RepKimDavilla, Questions - Problem Solving Round at Cavium Networks
Kim , an associate veterinarian with 4+ years of experience. Specialist in companion animal emergency and also expert at Sudoku , playing ...
RepOllieObrien, Financial Application Engineer at Accenture
Ollie , professional writer and translator with more than 4+ years of experience. I had a passion for lifelong learning about ...
RepTracieHoutz, Animator at ADP
I am Tracie , currently the Associate Art Director at Curtie , where I have an excellent reputation for my strong conceptual ...
@chrisK, @sudip.innovates
- mani0119 October 08, 2017how are you guys getting to that conclusion? please look at the same output:
100
_101_
_110_
111
_121_
101 has last digit as 1 and 2nd last digit as 0.
0-1 = -1. etc.
i've added the updated the word 'difference' with '_absolute_ difference' incase its not clear to any one :)