上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 37 下一页
摘要: You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contai 阅读全文
posted @ 2018-12-15 08:04 fatttcat 阅读(124) 评论(0) 推荐(0)
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2018-12-15 06:47 fatttcat 阅读(126) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 只反转从m到n的部分链表 M1: iterative 首先找到prev的位置(开始反转位 阅读全文
posted @ 2018-12-15 03:54 fatttcat 阅读(151) 评论(0) 推荐(0)
摘要: Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 阅读全文
posted @ 2018-12-14 09:34 fatttcat 阅读(191) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? M1: itera 阅读全文
posted @ 2018-12-10 20:47 fatttcat 阅读(115) 评论(0) 推荐(0)
摘要: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2018-12-09 13:49 fatttcat 阅读(122) 评论(0) 推荐(0)
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2018-12-09 11:21 fatttcat 阅读(140) 评论(0) 推荐(0)
摘要: Some people will make friend requests. The list of their ages is given and ages[i] is the age of the ith person. Person A will NOT friend request pers 阅读全文
posted @ 2018-12-09 10:36 fatttcat 阅读(150) 评论(0) 推荐(0)
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Example 2: Follow up: A straight forward solu 阅读全文
posted @ 2018-12-09 09:23 fatttcat 阅读(103) 评论(0) 推荐(0)
摘要: Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] 阅读全文
posted @ 2018-12-09 07:13 fatttcat 阅读(117) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 37 下一页