资源简介
leetcode(含python、java、c)代码合集,目录清晰,适合刷leetcode的朋友参考
代码片段和文件信息
public class Solution {
public List> threeSum(int[] num) {
Arrays.sort(num);
List> found = new ArrayList<>();
int pneg = 0 ppos = num.length - 1;
while(ppos > 0 && num[ppos] >= 0){
while(pneg < ppos && num[pneg] <= 0){
int sum = num[pneg] + num[ppos];
for(int i = pneg + 1; i < ppos; i++){
if(num[i] + sum == 0){
found.add(Arrays.asList(new Integer[]{num[pneg] num[i] num[ppos]}));
break;
}
}
int old = num[pneg];
while(pneg < ppos && num[pneg] == old) pneg++;
}
pneg = 0;
int old = num[ppos];
while(ppos > 0 && num[ppos] == old) ppos--;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 209 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\.gitignore
....... 118 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum\index.md
....... 811 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum\README.md
....... 1035 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum\Solution.java
....... 126 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum-closest\index.md
....... 73 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum-closest\README.md
....... 1002 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\3sum-closest\Solution.java
....... 118 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\4sum\index.md
....... 413 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\4sum\README.md
....... 2477 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\4sum\Solution.java
....... 158 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-and-search-word-data-structure-design\index.md
....... 0 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-and-search-word-data-structure-design\README.md
....... 2087 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-and-search-word-data-structure-design\Solution.java
文件 13 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-and-search-word-data-structure-design\WordDictionary.java
....... 124 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-binary\index.md
....... 112 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-binary\README.md
....... 1150 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-binary\Solution.java
....... 125 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-digits\index.md
....... 0 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-digits\README.md
....... 113 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-digits\Solution.java
....... 128 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-two-numbers\index.md
....... 140 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-two-numbers\README.md
....... 1246 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\add-two-numbers\Solution.java
....... 122 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\anagrams\index.md
....... 312 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\anagrams\README.md
....... 575 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\anagrams\Solution.java
文件 326 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\auto_time.sh
....... 135 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\balanced-binary-tree\index.md
....... 139 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\balanced-binary-tree\README.md
....... 744 2015-09-24 03:03 leetcode\leetcode(java)\leetcode-gh-pages\balanced-binary-tree\Solution.java
............此处省略2086个文件信息
相关资源
- java车辆管理项目ssh
- java8源码包含sun
- Java Web高级编程_全本中文扫描版(p
- 数据结构与算法分析:Java语言描述第
- 基于java wed的教务管理系统毕业设计全
- Java设计模式(第2版)中文版.pdf
- JDK1.8 API
- Java RESTful Web Service实战.part2
- agile java 中文完整版
- java LegendShop 商城
- Java: How to Program 9th Edition (Deitel)
- JAVA WEB mysql
- Java大学教程 How to Program中文版(第四
- 基于java的保险业务管理系统的设计与
- java员工考勤系统
- 基于javaEE的新闻发布系统的设计与实
- 基于JavaEE的网上图书销售系统的设计
- 基于Java的学生考勤系统的设计与实现
- 淘天下电商网站源码
- src.zip(java1.8)
- jsp+servlet+javabean+jdbc+mysql实现增删改查
- 基于jsp的学生信息管理系统
- 基于SSM框架的java快递代拿系统源码,
- zw_qq_36784544-11200541-javaWeb进销存管理系
- 房屋租赁信息发布系统
- eclipse ssh 三大框架资源
- Java员工管理系统
- 基于Java的固定资产的设计与实现
- 基于Java的动漫论坛的设计与实现
- 基于Java的电子政务网的设计与实现
评论
共有 条评论