Amazon Interview Question

1) Debug of code snippets to find bugs and rewrite the code for correct functionality