摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinctnumbers from the original list. Example 1: Example 2: 阅读全文
摘要:
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y 阅读全文
摘要:
Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length.Do not allocate extra 阅读全文
摘要:
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace 阅读全文
摘要:
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.You have the following 3 operations permitte 阅读全文
摘要:
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: 阅读全文