- 博客(4)
- 收藏
- 关注
转载 Leetcode Median of Two Sorted Arrays (java)
解法一: import java.util.Arrays; class Solution { public double findMedianSortedArrays(int[] nums1, int[] nums2) { //存储合并后的数组 int[] nums3 = new int[nums1.length + nums2.le...
2018-03-05 15:25:00 53
转载 Leetcode Longest Substring Without Repeating Characters (java)
解法一: class Solution { public int lengthOfLongestSubstring(String s) { int max = 0; if (s.length() <= 1) { max = s.length(); return max; ...
2018-03-03 21:12:00 93
转载 Leetcode Add Two Numbers (java)
解法: class Solution { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode l3 = null; boolean add = false; while (l1 != null || l2 != null) { ...
2018-03-01 21:53:00 61
转载 Leetcode Two Sum (java)
解法一: class Solution { public int[] twoSum(int[] nums, int target) { for (int i = 0; i < nums.length; i++) { for (int j = i + 1; j < nums.length; j++) { ...
2018-03-01 16:15:00 65
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人