摘要:
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 阅读全文
摘要:
Sort a linked list using insertion sort. 阅读全文
摘要:
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. 阅读全文
摘要:
Given a binary tree, return the postorder traversal of its nodes' values. 阅读全文
摘要:
Given a binary tree, return the preorder traversal of its nodes' values. 阅读全文
摘要:
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… 阅读全文
摘要:
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. 阅读全文
摘要:
Given a linked list, determine if it has a cycle in it. 阅读全文
摘要:
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. 阅读全文
摘要:
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. 阅读全文