1.原题: https://leetcode.com/problems/jewels-and-stones/ You're given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in S is a type of stone you have.  You want to know how many of th…
1.原题: https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ Given an integer number n, return the difference between the product of its digits and the sum of its digits. 翻译:给定一个数字n,返回乘积和总合的差. 理论上的输入输出: Input: n = 234 Out…
1.原题: https://leetcode.com/problems/defanging-an-ip-address/ 这道题本身很简单, Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". 翻译就是,给出一个ipv4地址,把这个地址中的“.…
Convert Binary Number in a Linked List to Integer这道题在leetcode上面算作是“easy”,然而小生我还是不会做,于是根据大佬的回答来整理一下思路以便日后复习. https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/ 1.原题: Given head which is a reference node to a singly-linked…
1.原题: https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/submissions/ Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows: Characters ('a' to 'i') are represen…
1.原题: https://leetcode.com/problems/range-sum-of-bst/ Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is guaranteed to have unique values. Input: root =…
1.原题: https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/ Given an integer n, return any array containing n unique integers such that they add up to 0. 翻译:给你一个int数n,返回一个包含n个唯一的int的array,其和sum必须为0. Input: n = 5 Output: [-7,-1,1,3,4] 2…
1.原题: https://leetcode.com/problems/minimum-time-visiting-all-points/ On a plane there are n points with integer coordinates points[i] = [xi, yi]. Your task is to find the minimum time in seconds to visit all points. You can move according to the nex…
1.原题: https://leetcode.com/problems/split-a-string-in-balanced-strings/ Split a String in Balanced Strings: Balanced strings are those who have equal quantity of 'L' and 'R' characters. Given a balanced string s split it in the maximum amount of bala…
1.原题: https://leetcode.com/problems/find-numbers-with-even-number-of-digits/ Given an array nums of integers, return how many of them contain an even number of digits. 翻译:给定一个整数数组,输出拥有偶数数位的数字的数量. 理论上的输入输出: Input: nums = [555,901,482,1771]Output: 1 2.…