摘要:
The complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation. For example, 阅读全文
摘要:
In a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge. If the town judge exists, the 阅读全文
摘要:
You are given a list of songs where the ith song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration 阅读全文
摘要:
Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.val| and a is an ancestor 阅读全文
摘要:
Given a positive integer k, you need to find the length of the smallest positive integer n such that n is divisible by k, and n only contains the digi 阅读全文
摘要:
Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node. Examp 阅读全文
摘要:
Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation. Note: You are 阅读全文
摘要:
Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. You 阅读全文
摘要:
The complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation. For example, 阅读全文