Subsets Total Accepted: 49746 Total Submissions: 176257My Submissions 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…
Word Ladder Total Accepted: 24823 Total Submissions: 135014My Submissions Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Ea…
Unique Paths II Total Accepted: 22828 Total Submissions: 81414My Submissions Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 an…
Unique Paths II Total Accepted: 31019 Total Submissions: 110866My Submissions Question Solution  Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty spa…
Remove Nth Node From End of List Total Accepted: 46720 Total Submissions: 168596My Submissions Question Solution  Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5,…
1741. Communication Fiend Time limit: 1.0 second Memory limit: 64 MB Kolya has returned from a summer camp and now he's a real communication fiend. He spends all his free time on the Web chatting with his friends via ICQ. However, lately the protocol…
Add Two Numbers Total Accepted: 55216 Total Submissions: 249950My Submissions You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num…
(1)Best Time to Buy and Sell Stock Total Accepted: 10430 Total Submissions: 33800My Submissions Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie…
Convert Sorted List to Binary Search Tree Total Accepted: 12283 Total Submissions: 45910My Submissions Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 总结:这个是网上找的,还不明确为什么是以下这个样子,去掉&,就出错 Lis…
Word Ladder Total Accepted: 10243 Total Submissions: 58160My Submissions Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Eac…
Word Ladder II Total Accepted: 11755 Total Submissions: 102776My Submissions Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be changed at a time Each i…
本文为senlie原创.转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Paths Total Accepted: 17915 Total Submissions: 57061My Submissions 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 e…
Best Time to Buy and Sell Stock Total Accepted: 14044 Total Submissions: 45572My Submissions Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, b…
Minimum Depth of Binary Tree Total Accepted: 24760 Total Submissions: 83665My Submissions Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.…
一.题目 Merge Two Sorted Lists My Submissions Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Show Tags Have you met this question in a real interview? Yes No…
Set Matrix Zeroes Total Accepted: 18139 Total Submissions: 58671My Submissions Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. 题意:给定矩阵,假设矩阵的某个位置为0.则把那一行那一列的全部元素都置为0 思路:用两个bool数组,分…
Validate Binary Search Tree Total Accepted: 23828 Total Submissions: 91943My Submissions Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with…
本文senlie原版的,转载请保留此地址:http://blog.csdn.net/zhengsenlie Rotate Image Total Accepted: 15609 Total Submissions: 49679My Submissions You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you d…
Insertion Sort List Total Accepted: 24444 Total Submissions: 96639My Submissions Sort a linked list using insertion sort. 题意:用插入排序对一个链表排序 思路: 插入排序对当前元素在前面已经排好的元素中找到一个位置把它插入 能够设置一个指向头节点的dummy元素.统一操作 注:链表中的交换节点操作,不能简单地仅仅交换节点里的value.由于value有可能是非常复杂的类,那样…
本文senlie原版的,转载请保留此地址:http://blog.csdn.net/zhengsenlie Candy Total Accepted: 16494 Total Submissions: 87468My Submissions There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjecte…
Combination Sum II Total Accepted: 13710 Total Submissions: 55908My Submissions Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be…
N-Queens Total Accepted: 15603 Total Submissions: 60198My Submissions The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-qu…
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Plus One Total Accepted: 17614 Total Submissions: 55852My Submissions Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the mos…
C#版 - Leetcode49 - 字母异位词分组 - 题解 Leetcode49.Group Anagrams 在线提交: https://leetcode.com/problems/group-anagrams/ 题目描述 给定一个字符串数组,将字母异位词组合在一起.字母异位词指字母相同,但排列不同的字符串. 示例: 输入: ["eat", "tea", "tan", "ate", "nat", &q…
版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C#版 - Leetcode 6. Z字形变换 - 题解 Leetcode 6. ZigZag Conversion 在线提交: https://leetcode-cn.com/problems/zigzag-conversion/ 题目描述 将字符串 "PAYPALISHIRING"以Z字形(Zigz…
版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C#版 - 226. Invert Binary Tree - 题解 在线提交: https://leetcode.com/problems/invert-binary-tree/ 或 http://www.nowcoder.com/practice/564f4c26aa584921bc75623e48ca301…
版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C#版 - Leetcode 347. Top K Frequent Elements - 题解 在线提交: https://leetcode.com/problems/top-k-frequent-elements/ Description Given a non-empty array of integers…
版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C#版 - Leetcode 215. Kth Largest Element in an Array-题解 在线提交: https://leetcode.com/problems/kth-largest-element-in-an-array/ Description Find the k th largest…
/* * @lc app=leetcode.cn id=551 lang=java * * [551] 学生出勤记录 I * * https://leetcode-cn.com/problems/student-attendance-record-i/description/ * * algorithms * Easy (46.31%) * Total Accepted: 3.5K * Total Submissions: 7.6K * Testcase Example: '"PPALLP&qu…
This document contains information about the process of submitting a paper to NIPS 2014. You can also find the Call for Papers, evaluation criteria for NIPS papers, a page with the style files, and a complete list of keywords on the NIPS website 1. P…