Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
Note: This problem is not even an example, stating that there are not many special cases, that is, to find the longest common prefix of all strings. He should not be more than the shortest of all the strings, you can try to find the shortest length n, then each reads and compares n , and decreases that n according to the situation .
Remove Nth Node from End of List
Given A linked list, remove the n th Node from the end of the list and return its head.
For example,
Given Linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
Note:
Given n would always be valid.
Try to do the in one pass.
Note: A linked list is given to remove the nth element of the countdown. Sounds very common technology, understand the structure of the list, use, advantages, and then do the problem.
Leetcode Topic Finishing-4