Amazon | Phone screen | URLify a given string (replace spaces with %20)

Date: Apr 2018

Questions:

  • How is Hashmap implemented, time complexities, details about how hash function works.
  • What is a BST, what is the time complexities
  • What algorithm you use to convert a BST that has only right children (sorted array)
  • Challenging work you have done in past.
  • Merge sort vs Quick sort, about their time complexities, which is preferable when sorting a large data set.
  • Write a method to replace all the spaces in a string with ‘%20’. You may assume that the string has sufficient space at the end to hold the additional characters, and that you are given the “true” length of the string.
Comments (18)