LeetCode
itorly
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 141. Linked List Cycle (Java)
Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to deno原创 2020-12-04 18:40:10 · 143 阅读 · 0 评论 -
LeetCode 232. Implement Queue using Stacks (Java)
Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Implement the MyQueue class: void push(int x) Pushes element x to the back of the queu原创 2020-12-04 17:31:29 · 242 阅读 · 0 评论 -
LeetCode 2. Add Two Numbers -Java
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 contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two number原创 2020-12-01 17:15:25 · 119 阅读 · 0 评论 -
LeetCode 1. Two Sum Java
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer原创 2020-11-28 21:51:21 · 185 阅读 · 0 评论
分享