PAT/LeetCode/hihoCoder
来自星星的松子
一个有理想的逗比。
展开
-
LeetCode - Best Time to Buy and Sell Stock
QuestionLink : https://leetcode.com/problems/best-time-to-buy-and-sell-stock/Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complet原创 2016-04-13 15:31:36 · 252 阅读 · 0 评论 -
LeetCode - Reverse String
QuestionLink : https://leetcode.com/problems/reverse-string/Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.原创 2016-04-22 23:11:23 · 452 阅读 · 0 评论 -
LeetCode - Ugly Number
QuestionLink : Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.原创 2016-04-21 11:43:17 · 334 阅读 · 0 评论 -
LeetCode - Power of Three
Given an integer, write a function to determine if it is a power of three.原创 2016-04-21 11:15:29 · 322 阅读 · 0 评论 -
LeetCode - Nim Game
QuestionLink : https://leetcode.com/problems/nim-game/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 s原创 2016-04-19 22:52:01 · 667 阅读 · 0 评论 -
LeetCode - Power of Four
QuestionLink : https://leetcode.com/problems/power-of-four/Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num = 16, return true. Given num原创 2016-04-19 22:21:39 · 398 阅读 · 0 评论 -
LeetCode - Majority Element
QuestionLink : https://leetcode.com/problems/majority-element/Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.原创 2016-04-16 23:45:52 · 276 阅读 · 0 评论 -
LeetCode - ZigZag Conversion
QuestionLink : https://leetcode.com/problems/zigzag-conversion/The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this...原创 2016-04-16 22:51:39 · 263 阅读 · 0 评论 -
LeetCode - Word Pattern
QuestionLink : https://leetcode.com/problems/word-pattern/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原创 2016-04-28 23:46:46 · 370 阅读 · 0 评论 -
LeetCode - Binary Tree Level Order Traversal
QuestionGiven a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).原创 2016-04-14 20:42:35 · 270 阅读 · 0 评论 -
LeetCode - Delete Node in a Linked List
QuestionLink : https://leetcode.com/problems/delete-node-in-a-linked-list/Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.原创 2016-04-14 20:13:29 · 273 阅读 · 0 评论 -
LeetCode - Two Sum
QuestionLink : https://leetcode.com/problems/two-sum/ 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 would have原创 2016-04-11 17:38:58 · 235 阅读 · 0 评论 -
LeetCode - Add Two Numbers
QuestionLink:https://leetcode.com/problems/add-two-numbers/ You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain原创 2016-04-11 17:45:13 · 316 阅读 · 0 评论 -
LeetCode - Add Digits
QuestionLink:https://leetcode.com/problems/add-digits/ Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.原创 2016-04-11 18:58:38 · 270 阅读 · 0 评论 -
LeetCode - Add Binary
QuestionLink:https://leetcode.com/problems/add-binary/ Given two binary strings, return their sum (also a binary string).原创 2016-04-11 19:52:59 · 342 阅读 · 0 评论 -
LeetCode - Balanced Binary Tree
QuestionGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never di原创 2016-04-13 14:34:33 · 261 阅读 · 0 评论 -
iOS-Effective Objective-C 2.0 读书笔记(一)
今天开始看了Effective Objective-C 2.0的一部分内容,然后打算记录下来一些其中提到的比较有用的注意点,然后在之后的实际开发过程中能有所规避,写出更好的代码。原创 2016-04-23 16:02:58 · 646 阅读 · 0 评论