[small Y learning algorithm] ⚡ Daily LeetCode punch in ⚡ - 48. Presence of duplicate Element II

📢 preface 🚀 Algorithm problem 🚀 🌲 Punching out an algorithm problem every day is not only a learning process, but also a sharing process 😜🌲 Tip: the problem-solving programming languages in this column are C# and Java🌲 To maintain a state of learning every day, let's work together to become the great God of algorithm ...

Added by Kev0121 on Sun, 03 Oct 2021 22:54:46 +0300

[Disordered Version < Swordfinger offer] Daily algorithm problem punctuation - Dynamic programming (Title 19,49,60)

Clock day23. Topic 1: Swordfinger Offer 19.Regular Expression Matching Please implement a function to match containment'. 'Regular expressions for and''. Characters in a pattern'.'denote any character, and''denotes that the characters preceding it can occur any number of times (including 0 times). In this topic, matching means that all cha ...

Added by 5kyy8lu3 on Sun, 03 Oct 2021 20:52:53 +0300

The sum of two and three numbers of Leetcode

1.Sum of Two Numbers Solving the sum of two numbers is the first question on LeetCode. One notable part of the title is that the same element in the array cannot be repeated in the answer. This paper tries to solve with the most direct method, and then optimize the solution process step by step. Knowledge points: Use of map, unordered_map ...

Added by shiflett on Sun, 03 Oct 2021 19:01:41 +0300

[out of order version ● sword finger offer] daily algorithm problem punch in problem solution - Search and backtracking algorithm (question no. 37,38)

Punch day22 Question 1: Sword finger Offer 37. Serialized binary tree Please implement two functions to serialize and deserialize the binary tree respectively. You need to design an algorithm to realize the serialization and deserialization of binary tree. There is no restriction on the execution logic of your sequence / deserialization a ...

Added by Smasher on Sun, 03 Oct 2021 00:04:13 +0300

The application of sword finger Offer-11 (the smallest number of rotating array) binary search, and the strictness of thinking.

catalogue Title: Idea:   code:   result:   Title: Moving the first elements of an array to the end of the array is called array rotation. Enter a rotation of an incrementally sorted array and output the smallest element of the rotation array. For example, arrays   [3,4,5,1,2] is a rotation of [1,2,3,4,5], and the ...

Added by cyclops on Thu, 30 Sep 2021 03:43:43 +0300

String ----- 6. String conversion integer (atoi)

Day 11: string to integer (atoi) Title Link: https://leetcode-cn.com/leetbook/read/top-interview-questions-easy/xnoilh/ Title: 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 s ...

Added by getmizanur on Thu, 30 Sep 2021 01:47:45 +0300

LeetCode 707. Design linked list

Title Description: Design the implementation of linked list. You can choose to use single linked list or double linked list. A node in a single linked list should have two attributes: val and next. val is the value of the current node, and next is the pointer / reference to the next node. If you want to use a two-way linked list, you also need ...

Added by aim25 on Sat, 25 Sep 2021 14:48:34 +0300

LeetCode skimming - find the central index of the array

This is the 1st / 100th question that I insist on swiping the card~   1, Title Description Give you an integer array nums, please calculate the central subscript of the array. The central subscript of the array is a subscript of the array. The sum of all elements on the left is equal to the sum of all elements on the right. If the centra ...

Added by vasoftwaresolutions on Tue, 21 Sep 2021 11:36:52 +0300

[algorithm] Analysis on the use of fast power operation in JavaScript

start Find the n-th power of x (just talk about n nonnegative first) Violent solution x n = x ⋅ x ⋅ ...

Added by Eugene on Mon, 20 Sep 2021 12:09:12 +0300

Fundamentals of algorithm - array

catalogue Knowledge points: Algorithm: 1. Binary search (loop invariant principle) Example 1: leetcode 704 binary search Example 2: leetcode 34. Find the first and last positions of elements in the sorted array Example 3: leetcode 69   Square root of x, using binary search 2. Double pointer Example 1: leetcode   27. Remove ele ...

Added by always_confused on Wed, 15 Sep 2021 00:29:49 +0300