Amazon Interview Question

Q. Write a code to delete a node in graph