JP Morgan Interview Report
- 0of 0 votes
AnswersWrite a program to print all permutations of a given string.
- NS March 03, 2016 in United States| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Problem Solving - 0of 0 votes
AnswersWrite a recursive Python function to print the factorial of a number n (ie, returns n!).
- NS March 03, 2016 in United States| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Python - 0of 0 votes
AnswersImplement a function DoIt( o,a ) such that the following code:
Object o = SomeClass() O.first = 'fizz' O.second = 'buzz' print DoIt( o, 'first) print DoIt(o, 'second')
prints
- NS March 03, 2016 in United States
fizz
buzz| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Python - 0of 0 votes
AnswersWrite a iterative Python function to print the factorial of a number n (ie, returns n!).
- NS March 03, 2016 in United States| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Python - 0of 0 votes
AnswersWrite a Python program to print numbers from 1 to 100 except for multiples of 3 for which you should print "fuzz" instead, for multiples of 5 you should print 'buzz' instead and for multiples of both 3 and 5, you should print 'fuzzbuzz' instead.
- NS March 03, 2016 in United States| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Python - 0of 0 votes
AnswersBoard Game:
- NS March 03, 2016 in United States
1) Write a program that can take a board of N x N filled with alphabets and print/return all the words that can be constructed by connecting alphabets together. You're allowed to connect alphabets in any direction including diagonally, the only restriction is that you cannot cross over the same alphabet twice. So for eg:
A,B,C,D
E,K,L,A
C,A,M,N
D,I,N,G
So example words that can be made are: BEAD, CALM, CAN, DAMN, MAKE.
2) What's the run time for your algorithm? Does your algorithm scale for large sizes of the matrix? What optimizations can you make to improve the run time.| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Data Structures - 0of 0 votes
AnswersIf you have the chapter of a book and you're supposed to build an index such that given a word, you can tell which pages the word occurs on, what data structure can you use? Optimize for space utilization.
- NS March 03, 2016 in United States| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Data Structures