Entries from 2017-01-31 to 1 day
problem Write a program to find the node at which the intersection of two singly linked lists begins. - If the two linked lists have no intersection at all, return null. The linked lists must retain their original structure after the funct…
problem Given a circular linked list, implement an algorithm that returns the node at the beginning of the loop. how to solve If I can use extra space, I can solve this very easily. I can justly use a hash table to detect if the element is…
problem There is a rectangular board that is divided into n rows by m columns of cells. Each cell is either empty or it contains an obstacle. You are given the description of the board in the board. Each character in board represents one c…
problem There is a rectangular board that is divided into n rows by m columns of cells. Each cell is either black or white. You are given the description of the board in the board. Each character in board represents one cell. More precisel…
problem Implment an algorithm to delete a node in the middle of a singly linked list. But you can only access to that node. note The solution is simply to copy the data from the next node over to the current node. code
problem Write code to remove duplicates from an unsorted linked list without using a temporary buffer. how to solve If I can use a temporary buffer, I recommend to use hash table. But in this case, I have to compare two elements to check t…