Amazon Interview Report
- 0of 0 votes
AnswersA planner wants to deign a city. A city having n points of interest and marked them from 0 - (n-1). Need to write two API:
- Harsh123 June 12, 2016 in India
public void buildRoad(int a, int b); // build road directly between a and b.
public boolean isRoadExist(int a, int b); // Check if there is any road connectivity exist between a & b (either directly or indirectly) then return TRUE else FALSE.
The solution should be in O(log n). You can first try in O(n).| Report Duplicate | Flag | PURGE
Amazon SDE-2 Problem Solving - 0of 2 votes
AnswersWrite all jumbled number which is >0 && <N, where N is provided by the user.
- Harsh123 June 12, 2016 in India
A jumbled number is a number whose neighbour digit (either left or right) max differ by 1 value.
e.g.:
8987 is a jumbled number.
13 is not a jumbled number.
123456 is a jumbled number.
287 is not jumbled number.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Problem Solving
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.