摘要: 题目: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack 阅读全文
posted @ 2017-02-26 07:17 panini 阅读(122) 评论(0) 推荐(0)
摘要: 题目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and 阅读全文
posted @ 2017-02-26 06:41 panini 阅读(206) 评论(0) 推荐(0)
摘要: 题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the 阅读全文
posted @ 2017-02-26 06:28 panini 阅读(114) 评论(0) 推荐(0)
摘要: 题目: Reverse a singly linked list. 链接: http://leetcode.com/problems/reverse-linked-list/ 2/25/2017, Java 之前的错误:看起来第一遍没有任何问题,但是1->2居然是time limit exceede 阅读全文
posted @ 2017-02-26 06:07 panini 阅读(167) 评论(0) 推荐(0)