摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2017-03-01 14:17 CodesKiller 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2017-03-01 11:57 CodesKiller 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文
posted @ 2017-03-01 10:52 CodesKiller 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-03-01 08:22 CodesKiller 阅读(513) 评论(0) 推荐(0) 编辑
摘要: In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2017-03-01 07:31 CodesKiller 阅读(536) 评论(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 take tu 阅读全文
posted @ 2017-03-01 03:00 CodesKiller 阅读(167) 评论(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 ston 阅读全文
posted @ 2017-03-01 02:55 CodesKiller 阅读(102) 评论(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 take tu 阅读全文
posted @ 2017-03-01 02:25 CodesKiller 阅读(170) 评论(0) 推荐(0) 编辑
摘要: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
posted @ 2017-03-01 01:26 CodesKiller 阅读(170) 评论(0) 推荐(0) 编辑