Nhảy tới nội dung

17 tài liệu đã gắn thẻ với "leetcode"

Xem tất cả Thẻ

136. Single Number

Given a non-empty array of integers `nums`, every element appears twice except for one. Find that single one.

141. Linked List Cycle

Given `head`, the head of a linked list, determine if the linked list has a cycle in it.

175. Combine Two Tables

Write a solution to report the first name, last name, city, and state of each person in the `Person` table. If the address of a `personId` is not present in the `Address` table, report null instead.

176. Second Highest Salary

Write a solution to find the second highest salary from the `Employee` table. If there is no second highest salary, return `null` (return `None` in Pandas).

177. Nth Highest Salary

Write a solution to find the nth highest salary from the `Employee` table. If there is no nth highest salary, return `null`.

182. Duplicate Emails

Write a solution to report all the duplicate emails. Note that it's guaranteed that the email field is not `NULL`.

191. Number of 1 Bits

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).

196. Delete Duplicate Emails

Write a solution to delete all duplicate emails, keeping only one unique email with the smallest id. After running your script, the answer shown is the `Person` table. The driver will first compile and run your piece of code and then show the `Person` table. The final order of the `Person` table does not matter.

338. Counting Bits

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`.

607. Sales Person

Write a solution to find the names of all the salespersons who did not have any orders related to the company with the name `RED`.

62. Unique Paths

Find the number of possible unique paths that the robot can take to reach the bottom-right corner.

Tutorials

Tổng hợp các tutorials, solutions cho các problems...