leetcode43. String multiplication

Given two nonnegative integers num1 and num2 in string form, return the product of num1 and num2, and their product is also expressed in string form. Example: input: num1 = "123", num2 = "456" output: "56088" explain: The length of num1 and num2 is less than 110.num1 and num2 contain only the nUTF-8...

Posted by adi on Mon, 20 Dec 2021 09:28:39 +1030

Data structure -- LeetCode special exercise Day9

119. Yanghui triangle II Given a nonnegative index rowIndex, return the row rowIndex of "Yang Hui triangle". In the Yang Hui triangle, each number is the sum of its upper left and upper right numbers. Example 1: Input: rowIndex = 3 Output: [1,3,3,1] Example 2: Input: rowIndex = 0 Output: [1] ExUTF-8...

Posted by faizanno1 on Mon, 20 Dec 2021 10:57:22 +1030

5 longest palindrome substring

subject Give you a string s and find the longest palindrome substring in S. Example 1: Enter: s = "bad" Output: "bab" Explanation: "aba" is also the answer to the question. Example 2: Input: s = "cbbd" Output: "bb" Example 3: Input: s = "a" Output: "a" Example 4: Input: s = "ac" Output: "a" MetUTF-8...

Posted by horsefaceba on Mon, 20 Dec 2021 15:40:25 +1030

โญ Introduction to algorithm โญ Hash table medium 03 - leetcode 380 O time to insert, delete, and get random elements

๐Ÿ™‰ If you don't eat or drink, you must brush the questions ๐Ÿ™‰ C language free animation tutorial, punch in with me! ๐ŸŒž Daylight science C language ๐ŸŒž LeetCode is too hard? Look at the simple questions first! ๐Ÿงก 100 cases of introduction to C language ๐Ÿงก Difficult data structure? It doesn't exiUTF-8...

Posted by aCa on Mon, 20 Dec 2021 22:04:53 +1030

LeetCode - string conversion integer (atoi)

subject Please implement a myAtoi(string s) function to convert the string into a 32-bit signed integer (similar to the atoi function in C/C + +). The algorithm of the function myAtoi(string s) is as follows: Read in the string and discard useless leading spaces Check whether the next characterUTF-8...

Posted by bambambanana on Mon, 20 Dec 2021 22:14:39 +1030

LeetCode 146.LRU caching mechanism

Link to brush questions: LRU caching mechanism subject Using the data structure you have mastered, design and implement an LRU (least recently used) caching mechanism. Implement LRUCache class: LRUCache(int capacity) initializes the LRU cache with a positive integer as capacityint get(int key) UTF-8...

Posted by nocontrol on Wed, 22 Dec 2021 23:17:46 +1030

โค๏ธ Python in-depth analysis of string [Dream's title] โšก]โค๏ธ LeetCode daily garden series โค๏ธ—— 551. Student attendance record I

๐Ÿ“ข๐Ÿ“ข๐Ÿ“ข๐Ÿ“ฃ๐Ÿ“ฃ๐Ÿ“ฃ ๐Ÿธ Hello, everyone. I'm Dream. Welcome to the theme park ๐Ÿ˜œ๐Ÿ˜œ๐Ÿ˜œ ๐Ÿน Notice for visiting the park: the park is never short of genius, and hard work is your final admission ticket! ๐Ÿš€๐Ÿš€๐Ÿš€ ๐Ÿน The tour guide mainly uses Python language and welcomes friends from other languages to play UTF-8...

Posted by ashton321 on Thu, 23 Dec 2021 08:32:36 +1030

โšก Daily algorithm & function Usage Summary โšก Learn integer to Roman numeral together

๐ŸŒบ Title: Roman numerals contain the following seven characters: I, V, X, L, C, D and M. character numerical value I 1 V 5 X 10 L 50 C 100 D 500 M 1000 For example, the Roman numeral 2 is written as II, which is two parallel ones. 12 is written as XII, which is X + II. 27 is written as XXVII, wUTF-8...

Posted by pod2oo5 on Thu, 23 Dec 2021 11:05:28 +1030

Notes on computer chicken job application - dynamic programming

Notes on computer chicken job application - dynamic programming Learning tutorial: Code Capriccio Sketch outline 509. Fibonacci number Summary: the introductory question is relatively simple. The following code can only define d p [ 0 ] dp[0] dp[0] and d p [ 1 ] dp[1] dp[1] for memory optimizatUTF-8...

Posted by raymie on Thu, 23 Dec 2021 15:38:15 +1030

1044. Programming language of longest repeated substring: java, python

Longest repeating substring Give you a string s and consider all its repeated substrings: that is, the continuous substrings of s appear 2 or more times in S. There may be overlap between these occurrences. Returns any repeating substring that may have the longest length. If s does not contain UTF-8...

Posted by Mikester on Thu, 23 Dec 2021 20:22:19 +1030