上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: Difficulty: Medium More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, 阅读全文
posted @ 2018-12-05 16:01 华仔要长胖 阅读(479) 评论(0) 推荐(0) 编辑
摘要: Difficulty: Hard More:【目录】LeetCode Java实现 Description Validate if a given string can be interpreted as a decimal number. Some examples:"0" => true" 0. 阅读全文
posted @ 2018-12-04 22:02 华仔要长胖 阅读(586) 评论(0) 推荐(0) 编辑
摘要: Difficulty: Medium More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi which converts a string t 阅读全文
posted @ 2018-12-03 22:51 华仔要长胖 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 本文根据《大话数据结构》一书,实现了Java版的直接插入排序。 更多:数据结构与算法合集 基本概念 直接插入排序思路:类似扑克牌的排序过程,从左到右依次遍历,如果遇到一个数小于前一个数,则将该数插入到左边所有比自己大的数之前,也就是说,将该数前面的所有更大的数字都后移一位,空出来的位置放入该数。 J 阅读全文
posted @ 2018-12-03 15:19 华仔要长胖 阅读(361) 评论(0) 推荐(0) 编辑
摘要: Difficulty: Easy More:【目录】LeetCode Java实现 Description Given a string, you need to reverse the order of characters in each word within a sentence while 阅读全文
posted @ 2018-11-28 15:46 华仔要长胖 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Difficulty: Medium More:【目录】LeetCode Java实现 Description Given an input string, reverse the string word by word. Example: Note: A word is defined as a 阅读全文
posted @ 2018-11-27 10:21 华仔要长胖 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/implement-strstr/ Implement strStr(). Return the index of the first 阅读全文
posted @ 2018-11-26 10:04 华仔要长胖 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, 阅读全文
posted @ 2018-11-24 11:15 华仔要长胖 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1.遍历键值对 使用map.entrySet(),注意foreach语句中的类型为Map.Entry<K, V> 2.遍历Key 使用map.keySet() 3.遍历Value 使用map.values() 阅读全文
posted @ 2018-11-23 19:45 华仔要长胖 阅读(1435) 评论(0) 推荐(0) 编辑
摘要: Difficulty:easy More:【目录】LeetCode Java实现 Description Design and implement a TwoSum class. It should support the following operations: addand find.add( 阅读全文
posted @ 2018-11-23 19:28 华仔要长胖 阅读(357) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页