首先科班出身大牛请点右上角的叉 因为我真不想浪费你的时间。 本文是给没有基础的刷题选手看的 (没有基础是指挣扎的在刷leetcode,或者是像我当时一样没有系统的学过算 ...
上面大概有140道题目, 分了类, 有需要的同学可以自己去看下,是c++版本的https://github.com/gulinghao1847/github/tree/master/leetcode
好痛苦,求安慰!LeetCode刷了100个题左右了,后面那些题都有难度啊,想半天想不出好方法,只好去看答案,看完答案一声吼,尼玛这些方法怎么想出来的!
大家一般几遍做对一个题目呢?有的时候一道题我能错好多遍才能做对。。。不好意思,拖了leetcode后腿。
Substring with Concatenation of All Words You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of s ...
我看到大家讨论刷题的时候有人是说的按难度从易到难,有人说的是按照高频。那这个难度分类和频率是leetcode网站统计的吗?还是大家统计的?好像没有官方的文件啊。还有大 ...
请问大家,有人一起刷题的吗,最近开始刷leetcode,求组队,有人建群的也可以留言,求加
看了一些贪心算法的证明方法,可惜不会应用到实际中来,真蛋疼。以Leecode jump game 2为例吧。Given an array of non-negative integers, you are initially positi ...
谁知道..发一下..翻了mit没翻到..google 也没找到
LZ我编程的时候不知道错按了那个键,出现了3个语言的框都显示出来的情况(C++,Java,Python),而且写好代码点submit就卡死在那里。。。。。。求问有没有人碰到过这种情 ...
Single Number II Total Accepted: 12874 Total Submissions: 39608My SubmissionsGiven an array of integers, every element appears three times except for one. F ...
求助各位编程大牛, 我做leetcode的题“Restore IP addresses” http://oj.leetcode.com/problems/restore-ip-addresses/, 对于递归的应用非常迷茫, 求助。一下为我尝试 ...
在本地电脑上运行可以输出正确结果,但是submit后 总是提示 Runtime Error [/backcolor]Last executed input:{}。请问这错误是什么意思,如何改呢? 谢谢了 ~ ...
Flatten Binary Tree to Linked List: http://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/题目说了要in-place, 但lz最初还是写了一个非in-place的。 ...
原题是这样的Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, ...
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate ...
不知到有没有人有类似的情况。我的code是这样的: public int candy(int[] ratings){ boolean[] min = new boolean[ratings.length]; int pre = - 1; for(int ...
run之后一直说wrong answerinput[3,2,4]6output 2,4expected 2,3这个expected明显是错的吧?!下面是我的代码[code]import java.util.HashMap;import ja ...
本人EE转CS小硕 创建了一个找工作群大家可以一起刷题,讨论,review代码,追公开课,和相互安慰鼓励。一起加油吧!!!群号:147952228大家踊跃加入啊!!!小妹 ...
今天刚开始看leetcode的oj题库,不太懂runtime多少算代码比较好,我用java,two sum用的是hashtable,runtime在352ms,可是用c++只要12ms。不知道为什么差距这么大?是我代 ...