摘要: Problem : Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which mak 阅读全文
posted @ 2020-03-30 23:33 littledy 阅读(79) 评论(0) 推荐(0)
摘要: Problem : Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Exam 阅读全文
posted @ 2020-03-30 23:21 littledy 阅读(81) 评论(0) 推荐(0)
摘要: Problem : Given a column title as appear in an Excel sheet, return its corresponding column number. For example: Example 1: Example 2: Example 3: 思路 : 阅读全文
posted @ 2020-03-30 23:10 littledy 阅读(98) 评论(0) 推荐(0)
摘要: Problem : Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end ind 阅读全文
posted @ 2020-03-30 16:41 littledy 阅读(94) 评论(0) 推荐(0)
摘要: Problem : Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element 阅读全文
posted @ 2020-03-30 15:25 littledy 阅读(77) 评论(0) 推荐(0)
摘要: Problem : Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements 阅读全文
posted @ 2020-03-30 01:00 littledy 阅读(80) 评论(0) 推荐(0)