摘要: Problem : Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non space characters. Please note that t 阅读全文
posted @ 2020-04-12 19:06 littledy 阅读(85) 评论(0) 推荐(0)
摘要: Problem : Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that 阅读全文
posted @ 2020-04-12 18:57 littledy 阅读(64) 评论(0) 推荐(0)
摘要: Problem : Given a positive integer n and you can do operations as follow: If n is even, replace n with n/2. If n is odd, you can replace n with either 阅读全文
posted @ 2020-04-12 16:43 littledy 阅读(86) 评论(0) 推荐(0)
摘要: Problem : A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elemen 阅读全文
posted @ 2020-04-12 12:54 littledy 阅读(96) 评论(0) 推荐(0)
摘要: Problem : Given a non empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The tim 阅读全文
posted @ 2020-04-12 11:07 littledy 阅读(76) 评论(0) 推荐(0)