Daily practice (31): turn the word order

title: daily practice (31): flip the word ordercategories: [sword finger offer]tags: [practice every day]date: 2022/03/05Daily practice (31): turn the word orderInput an English sentence and flip the order of words in the sentence, but the order of characters in the word remains the same. For simplicity, punctuation is treated like ordinary let ...

Added by skymanj on Sat, 05 Mar 2022 07:20:02 +0200

LeetCode longest special sequence I & II

LeetCode 521 longest special sequence I subject LeetCode 521 longest special sequence I Method: brain sharp turn The length of the subsequence of a string will not exceed the length of the string. If the length of the subsequence is equal to the length of the string, the subsequence is the string. If the two strings are the same ...

Added by vinaip on Sat, 05 Mar 2022 06:32:24 +0200

2104. Subarray range and

link 2104. Subarray range and subject Give you an integer array nums. In nums, the range of subarray is the difference between the largest element and the smallest element in the subarray. Returns the sum of all subarray ranges in num. A subarray is a sequence of consecutive non empty elements in an array. Examples Example 1: I ...

Added by elklabone on Sat, 05 Mar 2022 02:09:38 +0200

20210416 Likou question 17: letter combination of telephone number

  1. Title Given a string containing only the numbers , 2-9 , returns all the letter combinations it can represent. The answers can be returned in any order. The mapping of numbers to letters is given as follows (the same as telephone keys). Note that 1 does not correspond to any letter. Source: LeetCode link: https://leetcode-cn.com/pr ...

Added by ShadowMetis on Sat, 05 Mar 2022 01:34:24 +0200

Sets and strings

Sets and strings aggregate 1. Recognition set ''' A collection is a container type data type. Take {} as the flag of the container. Multiple data in it are separated by commas: {data 1, data 2, data 3,...} Variable (support addition, deletion and modification); Unordered (subscript operation is not supported) Requirements for elements: 1 ...

Added by olko on Sat, 05 Mar 2022 00:59:17 +0200

[algorithm practice] Blue Bridge Cup C++ AB group counseling topic list: Lecture 1 and 2 (Java solution version)

Anyway, brother y said that he would definitely enter the national competition after brushing. I'll try~ 1, Recursion and recursion 92. Recursive implementation of exponential enumeration (simple) Note that this problem is to solve the combination!! import java.util.LinkedList; import java.util.Scanner; public class Main { static Link ...

Added by Melville on Fri, 04 Mar 2022 20:53:45 +0200

Java data structure and algorithm -- in situ hash algorithm

In situ hash algorithm The in-situ hash algorithm is used to solve the problem with spatial complexity of O(1), and the result range is between [0, len (Num)], and num is the solution array provided by the problem. The in-situ hash algorithm is mainly used in the array solution with the result range of [0, len (Num)]. The space complexity is ...

Added by wisewood on Fri, 04 Mar 2022 20:30:33 +0200

Kubernetes - data storage

summary   the life cycle of containers may be very short and will be created and destroyed frequently. When the container is destroyed, the data saved in the container will also be cleared. This result is undesirable to users in some cases. kubernetes introduces the concept of Volume in order to persist the data of the container. &ems ...

Added by kvnirvana on Fri, 04 Mar 2022 20:17:04 +0200

Leetcode one question per day (two questions) - 3.4 + 3.3

Leetcode one question per day (two questions) - 3.4 + 3.3 preface I wrote the daily question of these two days, learned some new knowledge points, and made a comb and summary. 3.3 add up Given a non negative integer num, the numbers on each bit are added repeatedly until the result is a single digit. Return this result. Title Link ...

Added by rsnell on Fri, 04 Mar 2022 16:16:11 +0200

Leetcode2104: subarray range and (medium, iteration)

1. Title Description Give you an integer array nums. In nums, the range of subarray is the difference between the largest element and the smallest element in the subarray. Returns the sum of all subarray ranges in num. A subarray is a sequence of consecutive non empty elements in an array. Example 1: Input: num = [1,2,3] Output: 4 Explanatio ...

Added by gilliat on Fri, 04 Mar 2022 11:36:13 +0200