LeetCode 1816. Truncate Sentence
Description https://leetcode.com/problems/truncate-sentence/ A sentence is a list of words that are separated by a single space with no leading or trailing spaces.…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/truncate-sentence/ A sentence is a list of words that are separated by a single space with no leading or trailing spaces.…
Description https://leetcode.com/problems/sum-of-all-odd-length-subarrays/ Given an array of positive integers arr, calculate the sum of all possible odd-length subarrays. A subarray is a…
Description https://leetcode.com/problems/find-all-the-lonely-nodes/ In a binary tree, a lonely node is a node that is the only child of its parent node. The…
Description https://leetcode.com/problems/decode-xored-array/ There is a hidden integer array arr that consists of n non-negative integers. It was encoded into another integer array encoded of length n – 1, such…
Description https://leetcode.com/problems/count-items-matching-a-rule/ You are given an array items, where each items[i] = [typei, colori, namei] describes the type, color, and name of the ith item.…
Description https://leetcode.com/problems/check-if-n-and-its-double-exist/ Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 *…
Description https://leetcode.com/problems/number-of-different-integers-in-a-string/ You are given a string word that consists of digits and lowercase English letters. You will replace every non-digit character…
Description https://leetcode.com/problems/add-to-array-form-of-integer/ The array-form of an integer num is an array representing its digits in left to right order. For example, for num = 1321,…
Description https://leetcode.com/problems/reverse-vowels-of-a-string/ Given a string s, reverse only all the vowels in the string and return it. The vowels are ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’,…
Description https://leetcode.com/problems/binary-prefix-divisible-by-5/ Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to least-significant-bit.) Return a…