Leetcode Solutions
Language: javascript c mysql
Last updated: 2019-01-04
https://github.com/nusr/leetcode
# |
Problems |
Solutions |
Difficulty |
Acceptance |
Paid-Only |
001 |
two-sum |
c,javascript |
Easy |
39.69% |
No |
002 |
add-two-numbers |
javascript |
Medium |
30.01% |
No |
007 |
reverse-integer |
javascript |
Easy |
24.87% |
No |
008 |
string-to-integer-atoi |
javascript |
Medium |
14.34% |
No |
009 |
palindrome-number |
javascript,c |
Easy |
40.67% |
No |
013 |
roman-to-integer |
javascript |
Easy |
50.84% |
No |
020 |
valid-parentheses |
javascript |
Easy |
35.40% |
No |
021 |
merge-two-sorted-lists |
javascript |
Easy |
44.75% |
No |
027 |
remove-element |
c,javascript |
Easy |
42.90% |
No |
028 |
implement-strstr |
javascript |
Easy |
30.73% |
No |
035 |
search-insert-position |
c,javascript |
Easy |
40.21% |
No |
050 |
powx-n |
javascript |
Medium |
27.17% |
No |
053 |
maximum-subarray |
javascript,c |
Easy |
42.17% |
No |
058 |
length-of-last-word |
c |
Easy |
32.09% |
No |
065 |
valid-number |
javascript |
Hard |
13.57% |
No |
066 |
plus-one |
javascript |
Easy |
40.36% |
No |
067 |
add-binary |
javascript |
Easy |
37.10% |
No |
069 |
sqrtx |
c |
Easy |
30.13% |
No |
070 |
climbing-stairs |
javascript |
Easy |
42.73% |
No |
083 |
remove-duplicates-from-sorted-list |
c |
Easy |
41.51% |
No |
100 |
same-tree |
javascript |
Easy |
49.02% |
No |
102 |
binary-tree-level-order-traversal |
javascript |
Medium |
46.07% |
No |
104 |
maximum-depth-of-binary-tree |
javascript |
Easy |
58.24% |
No |
107 |
binary-tree-level-order-traversal-ii |
javascript |
Easy |
44.89% |
No |
110 |
balanced-binary-tree |
c,javascript |
Easy |
39.93% |
No |
111 |
minimum-depth-of-binary-tree |
javascript |
Easy |
34.54% |
No |
118 |
pascals-triangle |
javascript |
Easy |
43.51% |
No |
119 |
pascals-triangle-ii |
javascript |
Easy |
41.09% |
No |
121 |
best-time-to-buy-and-sell-stock |
c,javascript |
Easy |
45.45% |
No |
125 |
valid-palindrome |
c |
Easy |
29.54% |
No |
136 |
single-number |
javascript |
Easy |
58.07% |
No |
144 |
binary-tree-preorder-traversal |
javascript |
Medium |
49.51% |
No |
160 |
intersection-of-two-linked-lists |
javascript |
Easy |
31.21% |
No |
167 |
two-sum-ii-input-array-is-sorted |
javascript |
Easy |
48.39% |
No |
169 |
majority-element |
c,javascript |
Easy |
50.68% |
No |
175 |
combine-two-tables |
mysql |
Easy |
47.55% |
No |
189 |
rotate-array |
javascript,c |
Easy |
28.06% |
No |
190 |
reverse-bits |
javascript |
Easy |
29.43% |
No |
191 |
number-of-1-bits |
c |
Easy |
41.18% |
No |
202 |
happy-number |
c |
Easy |
43.68% |
No |
203 |
remove-linked-list-elements |
c |
Easy |
34.87% |
No |
204 |
count-primes |
javascript |
Easy |
27.66% |
No |
206 |
reverse-linked-list |
c |
Easy |
51.36% |
No |
217 |
contains-duplicate |
c,javascript |
Easy |
49.94% |
No |
226 |
invert-binary-tree |
javascript,c |
Easy |
56.23% |
No |
231 |
power-of-two |
c |
Easy |
41.42% |
No |
234 |
palindrome-linked-list |
c |
Easy |
34.84% |
No |
237 |
delete-node-in-a-linked-list |
javascript |
Easy |
50.88% |
No |
242 |
valid-anagram |
javascript |
Easy |
50.10% |
No |
258 |
add-digits |
c |
Easy |
53.14% |
No |
263 |
ugly-number |
c |
Easy |
40.21% |
No |
268 |
missing-number |
javascript,c |
Easy |
46.92% |
No |
283 |
move-zeroes |
c,javascript |
Easy |
53.11% |
No |
326 |
power-of-three |
c |
Easy |
41.21% |
No |
342 |
power-of-four |
javascript,c |
Easy |
39.82% |
No |
344 |
reverse-string |
c |
Easy |
62.22% |
No |
345 |
reverse-vowels-of-a-string |
javascript |
Easy |
40.43% |
No |
349 |
intersection-of-two-arrays |
javascript |
Easy |
51.75% |
No |
350 |
intersection-of-two-arrays-ii |
javascript |
Easy |
46.07% |
No |
367 |
valid-perfect-square |
c |
Easy |
39.09% |
No |
371 |
sum-of-two-integers |
javascript |
Easy |
51.26% |
No |
387 |
first-unique-character-in-a-string |
javascript |
Easy |
48.35% |
No |
389 |
find-the-difference |
javascript |
Easy |
52.40% |
No |
396 |
rotate-function |
javascript |
Medium |
34.62% |
No |
434 |
number-of-segments-in-a-string |
c |
Easy |
36.49% |
No |
441 |
arranging-coins |
c |
Easy |
37.11% |
No |
442 |
find-all-duplicates-in-an-array |
javascript |
Medium |
59.12% |
No |
461 |
hamming-distance |
c |
Easy |
69.72% |
No |
476 |
number-complement |
javascript |
Easy |
61.78% |
No |
485 |
max-consecutive-ones |
javascript,c |
Easy |
54.14% |
No |
504 |
base-7 |
javascript |
Easy |
44.32% |
No |
507 |
perfect-number |
javascript |
Easy |
32.78% |
No |
520 |
detect-capital |
c |
Easy |
52.06% |
No |
535 |
encode-and-decode-tinyurl |
javascript |
Medium |
75.13% |
No |
541 |
reverse-string-ii |
javascript |
Easy |
44.72% |
No |
551 |
student-attendance-record-i |
javascript |
Easy |
45.04% |
No |
557 |
reverse-words-in-a-string-iii |
javascript |
Easy |
62.40% |
No |
561 |
array-partition-i |
c,javascript |
Easy |
67.77% |
No |
595 |
big-countries |
mysql |
Easy |
72.43% |
No |
617 |
merge-two-binary-trees |
javascript |
Easy |
68.47% |
No |
620 |
not-boring-movies |
mysql |
Easy |
60.44% |
No |
627 |
swap-salary |
mysql |
Easy |
68.12% |
No |
637 |
average-of-levels-in-binary-tree |
javascript |
Easy |
57.41% |
No |
654 |
maximum-binary-tree |
c,javascript |
Medium |
71.08% |
No |
657 |
robot-return-to-origin |
javascript |
Easy |
70.17% |
No |
700 |
search-in-a-binary-search-tree |
c |
Easy |
64.86% |
No |
701 |
insert-into-a-binary-search-tree |
javascript,c |
Medium |
71.43% |
No |
709 |
to-lower-case |
javascript |
Easy |
75.25% |
No |
728 |
self-dividing-numbers |
javascript |
Easy |
68.17% |
No |
771 |
jewels-and-stones |
javascript |
Easy |
82.32% |
No |
804 |
unique-morse-code-words |
javascript |
Easy |
72.79% |
No |
832 |
flipping-an-image |
javascript |
Easy |
70.36% |
No |
852 |
peak-index-in-a-mountain-array |
javascript |
Easy |
68.20% |
No |
867 |
transpose-matrix |
javascript |
Easy |
63.43% |
No |
868 |
binary-gap |
javascript |
Easy |
59.17% |
No |
872 |
leaf-similar-trees |
javascript |
Easy |
61.40% |
No |
876 |
middle-of-the-linked-list |
javascript |
Easy |
63.02% |
No |
884 |
uncommon-words-from-two-sentences |
javascript |
Easy |
60.41% |
No |
905 |
sort-array-by-parity |
javascript |
Easy |
71.56% |
No |
922 |
sort-array-by-parity-ii |
javascript |
Easy |
66.26% |
No |
929 |
unique-email-addresses |
javascript |
Easy |
79.78% |
No |
938 |
range-sum-of-bst |
javascript |
Medium |
80.73% |
No |
961 |
n-repeated-element-in-size-2n-array |
javascript,c |
Easy |
73.70% |
No |
965 |
univalued-binary-tree |
javascript,c |
Easy |
72.55% |
No |
- 【LeetCode题解】二叉树的遍历
我准备开始一个新系列[LeetCode题解],用来记录刷LeetCode题,顺便复习一下数据结构与算法. 1. 二叉树 二叉树(binary tree)是一种极为普遍的数据结构,树的每一个节点最多只有 ...
- leetcode题解-122买卖股票的最佳时期
题目 leetcode题解-122.买卖股票的最佳时机:https://www.yanbinghu.com/2019/03/14/30893.html 题目详情 给定一个数组,它的第 i 个元素是一支 ...
- 【LeetCode题解】3_无重复字符的最长子串(Longest-Substring-Without-Repeating-Characters)
目录 描述 解法一:暴力枚举法(Time Limit Exceeded) 思路 Java 实现 Python 实现 复杂度分析 解法二:滑动窗口(双指针) 思路 Java 实现 Python 实现 复 ...
- 【LeetCode题解】225_用队列实现栈(Implement-Stack-using-Queues)
目录 描述 解法一:双队列,入快出慢 思路 入栈(push) 出栈(pop) 查看栈顶元素(peek) 是否为空(empty) Java 实现 Python 实现 解法二:双队列,入慢出快 思路 入栈 ...
- 【LeetCode题解】232_用栈实现队列(Implement-Queue-using-Stacks)
目录 描述 解法一:在一个栈中维持所有元素的出队顺序 思路 入队(push) 出队(pop) 查看队首(peek) 是否为空(empty) Java 实现 Python 实现 解法二:一个栈入,一个栈 ...
- 【LeetCode题解】844_比较含退格的字符串(Backspace-String-Compare)
目录 描述 解法一:字符串比较 思路 Java 实现 Python 实现 复杂度分析 解法二:双指针(推荐) 思路 Java 实现 Python 实现 复杂度分析 更多 LeetCode 题解笔记可以 ...
- 【LeetCode题解】25_k个一组翻转链表(Reverse-Nodes-in-k-Group)
目录 描述 解法一:迭代 思路 Java 实现 Python 实现 复杂度分析 解法二:递归(不满足空间复杂度) 思路 Java 实现 Python 实现 复杂度分析 更多 LeetCode 题解笔记 ...
- 【LeetCode题解】24_两两交换链表中的节点(Swap-Nodes-in-Pairs)
目录 描述 解法一:迭代 思路 Java 实现 Python 实现 复杂度分析 解法二:递归(不满足空间复杂度要求) 思路 Java 实现 Python 实现 复杂度分析 更多 LeetCode 题解 ...
- 【LeetCode题解】347_前K个高频元素(Top-K-Frequent-Elements)
目录 描述 解法一:排序算法(不满足时间复杂度要求) Java 实现 Python 实现 复杂度分析 解法二:最小堆 思路 Java 实现 Python 实现 复杂度分析 解法三:桶排序(bucket ...
- 【LeetCode题解】19_删除链表的倒数第N个节点(Remove-Nth-Node-From-End-of-List)
目录 描述 解法:双指针 思路 Java 实现 Python 实现 复杂度分析 更多 LeetCode 题解笔记可以访问我的 github. 描述 给定一个链表,删除链表的倒数第 n 个节点,并且返回 ...
随机推荐
- php对接微信小程序支付
前言:这里我就假装你已经注册了微信小程序,并且基本的配置都已经好了.注: 个人注册小程序不支持微信支付,所以我还是假装你是企业或者个体工商户的微信小程序,其他的商户号注册,二者绑定,授权,支付开通,就 ...
- HTML(总结)
HTML 浏览器内核有哪些 Trident:IE Gecko:Firefox Webkit:Chrome Safari Presto:Opera(投奔Webkit) html5的一些新特性 1. 拖拽 ...
- DW自动换行
查看→代码视图选项→自动换行
- centos环境的python、scrapy部署
1 操作系统 Centos 6.5 64bit 或以上版本 2 软件环境 提示:(1)用什么软件:(2)运行环境(3)开发包. Python:Python-2.7.6.tgz Scrapy:Scrap ...
- 如何通过织云 Lite 愉快地玩转 TSW
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 织云 Lite & TSW 织云 Lite 是一款轻量型服务管理平台,提供标准化的应用打包操作,可连接持续集成系统,完成线上程序分发 ...
- registration_db.go
, atomic.LoadInt64(&p.peerInfo.lastUpdate)) if now.Sub(cur) > inactivityTimeout || p. ...
- hibernate 一对一关系
一对一的另一种解决方式就是主键关联,在这种关联关系中,要求两个对象的主键必须保持一致,通过两个表的主键建立关联关系须外键参与. 没法传图 我就用这个表示吧 看id Copany Add ...
- ./configure、make、make install
这些都是典型的使用GNU的AUTOCONF和AUTOMAKE产生的程序的安装步骤 一.基本信息 1../configure 是用来检测你的安装平台的目标特征的.比如它会检测你是不是有CC或GCC,并不 ...
- 【SAP业务模式】之STO(二):系统配置
本篇博文开始讲述STO业务模式的配置! 一.定义发货工厂的装运数据: 目录:SPRO-物料管理-采购-采购订单-设置库存调拨订单-定义工厂的装运数据 定义发货工厂的装运数据: 为收货工厂分配客户代码: ...
- jdk源码阅读笔记-LinkedHashMap
Map是Java collection framework 中重要的组成部分,特别是HashMap是在我们在日常的开发的过程中使用的最多的一个集合.但是遗憾的是,存放在HashMap中元素都是无序的, ...