bs
BAN USER
- 0of 0 votes
AnswersWrite an efficient function that returns the n’th Fibonacci number (There are many ways to solve this problem. Please write the most efficient method possible). Each Fibonacci number is the sum of the last two. The first 10 are: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.
- bs in United States
long getNthFibonacci(long i) { ... }| Report Duplicate | Flag | PURGE
Amazon Web Developer Algorithm - 0of 0 votes
AnswersSetup:
- bs in United States
Assume primitive Facebook. FB has Members.
class Member {
String name;
String email;
List<Member> friends;
}
Question:
Code printSocialGraph(Member m). Direct friends of m are Level 1 friends. Friends of friends are level 2 friends.....and so on
Print level 1 friends first. Then print level 2 friends....and so on
void printfriendsByLevel(Member m){
//Your code here
}| Report Duplicate | Flag | PURGE
Amazon Web Developer Coding - 0of 0 votes
AnswersLet's say we're developing a vector graphics application. It will allow the user to create lines, rectangles, circles, text, etc. and manipulate them independently - move them, resize them, etc. Design an object model for this application. (How would you model the representation of the document in an object oriented language? What classes would you define? What methods would you have? What would your API look like?)
- bs in United States| Report Duplicate | Flag | PURGE
Amazon Web Developer Object Oriented Design