vickykansal
BAN USER
Questions (2)
Comments (2)
Reputation 115
- 0of 0 votes
Answersreverse a single linked link - recursive and iterative. tell the O(n) for each.
- vickykansal in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswersQ: Pretend I'm a Dog breeder and you are an SDE. Design a solution for tracking my dog's pedigrees.
- vickykansal in United States
Followup - pedigree may also be hybrid. need a data structure which can lookup by pedigree to see if dog exists. also should be able to search by pedigree and some characters of dog.| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
1
of 1 vote
This will not work to swap the 3 bits to 'm' as n is not in a intermediate state rather the mask is - m=m^n
Correct solution to swap and update m will be below i think as i tested.
m=m^ (mask << i);
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Good solution . Except you missed the - "excluding the last character. "
- vickykansal October 04, 2013