Bloomberg | Phone | Collatz Conjecture
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-11-24Added By Anonymous
Source: Link
Company: Bloomberg
Role: unknown
Interview Stage: Phone
Location: unknown
Year: unknown
Original Experience:
- Phone interview with Bloomberg - Question: Determine the length of Collatz Conjecture. Discuss different approaches (iterative vs recursive). I used the iterative approach - Follow up questions: 1) How would you make subsequent computations more efficient? - Use a Hashmap 2) There are several repeated calculations within the While Loop. Is there a way we can optimize them? -> Use a stack to keep track of the values previously seen and store the results in Hash Map - I had to also implement the follow up questions - Questions on Why Bloomberg/Fav Project/Why SE and so on
Role: unknown
Interview Stage: Phone
Location: unknown
Year: unknown
Original Experience:
- Phone interview with Bloomberg - Question: Determine the length of Collatz Conjecture. Discuss different approaches (iterative vs recursive). I used the iterative approach - Follow up questions: 1) How would you make subsequent computations more efficient? - Use a Hashmap 2) There are several repeated calculations within the While Loop. Is there a way we can optimize them? -> Use a stack to keep track of the values previously seen and store the results in Hash Map - I had to also implement the follow up questions - Questions on Why Bloomberg/Fav Project/Why SE and so on