打赏

随笔分类 -  Leetcode

摘要:1. 反转链表:Leetcode 206 Approach 1: 使用2个指针 Beats: 89.94% Approach 2: 递归 Beats: 66.67% 2. 回文链表: Leetcode 234 Given a singly linked list, determine if it i 阅读全文
posted @ 2019-03-31 11:14 listenviolet 阅读(290) 评论(0) 推荐(0)
摘要:54. Spiral Matrix [Medium] Description Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Exampl 阅读全文
posted @ 2018-09-23 22:39 listenviolet 阅读(182) 评论(0) 推荐(0)
摘要:55. Jump Game Description Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the a 阅读全文
posted @ 2018-09-21 16:13 listenviolet 阅读(187) 评论(0) 推荐(0)
摘要:35. Search Insert Position Description Given a sorted array and a target value, return the index if the target is found. If not, return the index wher 阅读全文
posted @ 2018-09-18 19:49 listenviolet 阅读(176) 评论(0) 推荐(0)
摘要:Description Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", wh 阅读全文
posted @ 2018-08-16 09:50 listenviolet 阅读(147) 评论(0) 推荐(0)
摘要:Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their 阅读全文
posted @ 2018-08-06 10:27 listenviolet 阅读(147) 评论(0) 推荐(0)
摘要:Description Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input w 阅读全文
posted @ 2018-08-05 09:36 listenviolet 阅读(114) 评论(0) 推荐(0)