Expedia Group interview question

Questions included in my description

Interview Answers

Anonymous

6 Nov 2021

For the first LC problem. I can see an O(n^2) solution pretty easily. Was wondering if there are any faster solutions, that don't require looking at every single character, if even possible?

4

Anonymous

26 Feb 2022

Yes O(N) go for a loop to append all the elements inside the input array into one string then then iterate through it using charAt adding each number to a new list.

Anonymous

15 June 2022

Second question is fibonacci. Here's my solution: var climbStairs = function(n) { let a = b = 1 while(n--){ a = (b+=a) -a //Another way to say let temp = a; a = b; b = temp+b } return a };