一、原题 Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.  You should preserve the original relative order of the nodes in each

LeetCode   java   单链表   分区  

一、原题   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 “adjacent” cells are those horizontally or ver

LeetCode   java   单词搜索   递归   回溯  

一、原题 Given a sorted linked list, delete all duplicates such that each element appear only once.  For example,  Given 1->1->2, return 1->2.  Given 1->1->2->3->3, return 1->2->3.  一、中文 给定一个单链表,删除重复的元素,相

LeetCode   java   单链表   重复元素  

一、原题 Given a set of distinct integers, nums, return all possible subsets.  Note:  Elements in a subset must be in non-descending order.  The solution set must not contain duplicate subsets.  For examp

java   LeetCode   所有子集  

一、原题 Given two binary strings, return their sum (also a binary string).  For example,  a = "11"  b = "1"  Return "100"  一、中文 给定两个二进制的字符串,返回它们的和,也是二进行制字符串。  三、举例 str1 = “111”,str2=“1”最后返回的结果的是1000 四、思路

java   LeetCode  

一、原题 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.  Note: You can only move either down or right

java   LeetCode   logN  

一、原题 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).  The robot can only move either down or right at any point in time. The robot is trying to reach t

java   LeetCode  

一、原题 Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).  You may assume that the intervals were initially sorted according to their start times. 

java   LeetCode  

一、原题   Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:    Integers in each row are sorted from left to right.    The first integer

LeetCode   java   logN   数组中重复元素  

一、原题 Given a collection of intervals, merge all overlapping intervals.  For example,  Given [1,3],[2,6],[8,10],[15,18],  return [1,6],[8,10],[15,18].  一、中文 给定一个区间集合,合并有重叠的区间。  三、举例 比如区间1、3和区间2、6合并之后的最

java   LeetCode   时间复杂度   logN   排序算法  
1 2 3