136. Single Number
Given a non-empty array of integers `nums`, every element appears twice except for one. Find that single one.
Given a non-empty array of integers `nums`, every element appears twice except for one. Find that single one.
Write a function that takes the binary representation of an unsigned integer and returns the number of `1` bits it has (also known as the Hamming weight).
Given an integer `n`, return an array `ans` of length `n + 1` such that for each `i` (0 <= i <= n), `ans[i]` is the number of 1's in the binary representation of `i`.