摘要:
Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no less than 阅读全文
摘要:
Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 求两数相除,不能用乘法,除法和取余操作。 解法:位操作Bit Operati 阅读全文
摘要:
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 给一个字符串按照字符出现的频率来排序。 Java: Python: P 阅读全文
摘要:
A group of two or more people wants to meet and minimize the total travel distance. You are given a 2D grid of values 0 or 1, where each 1 marks the h 阅读全文
摘要:
You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. 阅读全文
摘要:
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
摘要:
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
摘要:
A message containing letters from A-Z is being encoded to numbers using the following mapping way: Beyond that, now the encoded string can also contai 阅读全文