
Hash Table
文章平均质量分 62
liujunlovecs
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode#3||Longest Substring Without Repeating Characters
Using HashSet. public class Solution { public int lengthOfLongestSubstring(String s) { if (s == null || s.length() == 0) { return 0; } Set set = new H原创 2015-08-11 10:07:16 · 275 阅读 · 0 评论 -
Leetcode#1||Two Sum
public class Solution { public int[] twoSum(int[] nums, int target) { if (nums == null || nums.length < 2) { return null; } Map map = new HashMap();原创 2015-08-11 09:11:57 · 232 阅读 · 0 评论 -
Leetcode#18||4 Sum
public class Solution { public List> fourSum(int[] nums, int target) { List> result = new ArrayList>(); if (nums == null || nums.length < 3) { return result;原创 2015-08-12 12:09:00 · 229 阅读 · 0 评论 -
Leetcode#30||Substring with Concatenation of All Words
public class Solution { public List findSubstring(String s, String[] words) { List result = new ArrayList(); if (s == null || s.length() == 0 || words.length == 0) {原创 2015-08-13 10:20:27 · 216 阅读 · 0 评论 -
Leetcode#36||Valid Sudoku
public class Solution { public boolean isValidSudoku(char[][] board) { if (board == null || board.length == 0 || board[0].length == 0) { return false; }原创 2015-08-15 07:52:56 · 224 阅读 · 0 评论 -
Leetcode#49||Group Anagrams
public class Solution { public List> groupAnagrams(String[] strs) { List> result = new ArrayList>(); if (strs == null || strs.length == 0) { return result;原创 2015-08-17 10:04:32 · 224 阅读 · 0 评论 -
Leetcode#76||Minimum Window Substring
public class Solution { public String minWindow(String s, String t) { String result = ""; if (s == null || t == null || s.length() < t.length()) { return resul原创 2015-08-19 16:51:15 · 379 阅读 · 0 评论 -
Maximal Rectangle
public class Solution { public int maximalRectangle(char[][] matrix) { if (matrix == null || matrix.length == 0 || matrix[0].length == 0) { return 0; } int row原创 2015-08-07 10:34:16 · 366 阅读 · 0 评论