Amazon Interview Question

coding question were related to stack, queue