![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 245 阅读 · 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 · 210 阅读 · 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 · 199 阅读 · 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 · 197 阅读 · 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 · 203 阅读 · 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 · 206 阅读 · 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 · 328 阅读 · 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 · 338 阅读 · 0 评论