Amazon interview question

Q. Write a code to delete a node in graph