摘要:
算法描述: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1, 阅读全文
摘要:
算法描述: Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after 阅读全文
摘要:
算法描述: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all un 阅读全文
摘要:
算法描述: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of t 阅读全文
摘要:
算法描述: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives 阅读全文
摘要:
算法描述: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two 阅读全文
摘要:
算法描述: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed 阅读全文
摘要:
算法描述: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runti 阅读全文
摘要:
算法描述: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not 阅读全文
摘要:
算法描述: Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You 阅读全文