上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页
摘要: 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: Example 2: Exa 阅读全文
posted @ 2019-08-23 15:36 fatttcat 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write a function to determine if it is a power of two. Example 1: Example 2: Example 3: M1: count how many bits are 1s, if # of 1s = 阅读全文
posted @ 2019-08-23 15:29 fatttcat 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
posted @ 2019-08-23 13:34 fatttcat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of dup 阅读全文
posted @ 2019-08-23 10:38 fatttcat 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given an array A of positive integers, call a (contiguous, not necessarily distinct) subarray of A good if the number of different integers in that su 阅读全文
posted @ 2019-08-23 08:55 fatttcat 阅读(446) 评论(0) 推荐(0) 编辑
摘要: Given a binary array data, return the minimum number of swaps required to group all 1’s present in the array together in any placein the array. Exampl 阅读全文
posted @ 2019-08-23 06:37 fatttcat 阅读(664) 评论(0) 推荐(0) 编辑
摘要: Given a string s that consists of only uppercase English letters, you can perform at most k operations on that string. In one operation, you can choos 阅读全文
posted @ 2019-08-21 12:53 fatttcat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a string S, return the number of substrings of length K with no repeated characters. Example 1: Example 2: Note: sliding window 1. first store t 阅读全文
posted @ 2019-08-21 09:15 fatttcat 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Given two strings s1 and s2, write a function to return true if s2contains the permutation of s1. In other words, one of the first string's permutatio 阅读全文
posted @ 2019-08-21 08:51 fatttcat 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains only 1s. 阅读全文
posted @ 2019-08-19 04:22 fatttcat 阅读(103) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页