Nicksxs's Blog

What hurts more, the pain of hard work or the pain of regret?

Longest Substring Without Repeating Characters。Given a string, find the length of the longest substring without repeating characters. For ex…

阅读全文 »

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain…

阅读全文 »

For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00…

阅读全文 »

Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). For example, the 32-bit integer ‘11’ has binary representation 00000000000000000000000000001011, so the function should return 3.

阅读全文 »
0%