LeetCode 338. Counting Bits
Description https://leetcode.com/problems/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…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/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…
Description https://leetcode.com/problems/all-paths-from-source-to-target/ The product sum of two equal-length arrays a and b is equal to the sum of a[i] * b[i] for all 0 <= i < a.length (0-indexed). For…
Description https://leetcode.com/problems/all-paths-from-source-to-target/ Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n – 1, find all possible paths from node 0 to…
Description https://leetcode.com/problems/the-latest-login-in-2020/ SQL Schema Table: Logins +—————-+———-+ | Column Name | Type | +—————-+———-+ | user_id | int | | time_stamp…
Description https://leetcode.com/problems/calculate-special-bonus/ SQL Schema Table: Employees +————-+———+ | Column Name | Type | +————-+———+ | employee_id | int | | name…
Description https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/ You have a graph of n nodes. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is…
Description https://leetcode.com/problems/largest-substring-between-two-equal-characters/ Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there…
Description https://leetcode.com/problems/longest-palindrome/ Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with…
Description https://leetcode.com/problems/baseball-game/ You are keeping score for a baseball game with strange rules. The game consists of several rounds, where…
Description https://leetcode.com/problems/check-if-word-equals-summation-of-two-words/ The letter value of a letter is its position in the alphabet starting from 0 (i.e. ‘a’ -> 0, ‘b’ -> 1, ‘c’ -> 2,…