摘要: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re 阅读全文
posted @ 2017-07-03 21:11 王大咩的图书馆 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文
posted @ 2017-07-03 17:10 王大咩的图书馆 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't ma 阅读全文
posted @ 2017-07-03 16:39 王大咩的图书馆 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers a1 , a2 , ..., an , where each represents a point at coordinate (i, ai ). n vertical lines are drawn such that the two e 阅读全文
posted @ 2017-07-03 16:14 王大咩的图书馆 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2017-07-03 00:44 王大咩的图书馆 阅读(208) 评论(0) 推荐(1) 编辑