摘要: 题目: Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 链接: https 阅读全文
posted @ 2017-03-08 07:05 panini 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 链接: http://leetcode.com/probl 阅读全文
posted @ 2017-03-08 06:39 panini 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目: You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend tak 阅读全文
posted @ 2017-03-08 06:15 panini 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 阅读全文
posted @ 2017-03-08 03:54 panini 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a l 阅读全文
posted @ 2017-03-08 03:22 panini 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, 阅读全文
posted @ 2017-03-08 02:57 panini 阅读(122) 评论(0) 推荐(0) 编辑