摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2016-12-01 13:49 微微程序媛 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For 阅读全文
posted @ 2016-12-01 13:41 微微程序媛 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. 使用快慢指针, fast每次前进两 阅读全文
posted @ 2016-12-01 12:47 微微程序媛 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 136. Single Number Given an array of integers, every element appears twice except for one. Find that single one. Bit: a ^ a = 0; 137. Single Number II 阅读全文
posted @ 2016-12-01 12:14 微微程序媛 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 62. Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down 阅读全文
posted @ 2016-12-01 11:18 微微程序媛 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the followi 阅读全文
posted @ 2016-12-01 10:11 微微程序媛 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a 阅读全文
posted @ 2016-12-01 09:40 微微程序媛 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or 阅读全文
posted @ 2016-12-01 06:28 微微程序媛 阅读(168) 评论(0) 推荐(0) 编辑