LeetCode notes (C language version, September)

Day Practise - 3 problems one day 2021.9.16 1 - 3 2021.9.17 4 - 6 2021.9.18 7 - 9 2021.9.19 10 - 12 2021.9.20 13 - 15 2021.9.21 16 - 18 2021.9.22 19 - 21 3h 2021.9.23 22 - 24 2h 2021.9.24 25 - 27 1h40m 2021.9.25 28 - 30 1h8m 2021.9.26 31 - 33 1h28m 2021.9.27 34 - 36 34m 2021.9.28 37 - 39 2h10m 40 - 1h4 ...

Posted by jauson on Tue, 30 Nov 2021 03:53:26 -0800

LeetCode brush questions - perfect rectangle

Preface description Algorithm learning, daily problem brushing records. Topic connection Perfect rectangle Topic content Give you an array of rectangles, where rectangles[i] = [xi, yi, ai, bi] represents a rectangle with parallel coordinate axes. The lower left vertex of the rectangle is (xi, yi) and the upper right vertex is (ai, bi). Re ...

Posted by sgoku01 on Mon, 29 Nov 2021 15:25:38 -0800

Computer exercises

13. Given two strings containing only lowercase letters, calculate the length of the maximum common substring of the two strings. Note: the definition of substring refers to a string formed after deleting some prefixes and suffixes (or not deleted). import java.util.*; public class Main{ public static void main(String[] args) { Sca ...

Posted by wesley1189 on Mon, 29 Nov 2021 13:41:36 -0800

String to integer (atoi)

Title: Please realize one   myAtoi(string s)   Function to convert a string into a 32-bit signed integer (similar to the atoi function in C/C + +). function   The algorithm of myAtoi(string s) is as follows: Read in the string and discard useless leading spaces Check whether the next character (assuming it has not reached the ...

Posted by bryson on Mon, 29 Nov 2021 13:28:35 -0800

Mybatis uses @ Insert annotation to Insert multiple records. Several methods of JSONObject to List

Mybatis inserts multiple records using the @ Insert annotation Several methods of converting JSONObject to List In a large software engineering job, if an administrator wants to send messages to multiple users, the front end needs to send an array with user numbers to the back end. Here is a summary of several methods for the back-end to rece ...

Posted by mzfp2 on Mon, 29 Nov 2021 07:27:19 -0800

leetcode lecture on algorithm interview in Dachang 10. Recursion & divide and conquer

leetcode lecture on algorithm interview in Dachang 10. Recursion & divide and conquerVideo tutorial (efficient learning): Click to learncatalog:1. Introduction2. Time and space complexity3. Dynamic planning4. Greed5. Binary search6. Depth first & breadth first7. Double pointer8. Sliding window9. Bit operation10. Recursion & divide a ...

Posted by SureFire on Sun, 28 Nov 2021 21:45:17 -0800

Stack and queue Title Records

Recorded on November 28, 2021 Next up was the last blog post on stacks and queues Stack and queue title record (I) 232. Implement queue with stack Idea: this topic is a simulation problem to investigate the understanding of stack and queue. Because the stack is Filo (can only enter and pop up at the top of the stack), and the queue is FIFO ...

Posted by jkraft10 on Sun, 28 Nov 2021 05:27:16 -0800

Ten thousand people and one thousand problems plan-39

preface The front is the solution given by brother hero today. The back binary tree is your own content. Just look at it according to your own needs Recommended community: ten thousand people and one thousand questions Today's solution The number of statistical digits is even Idea: According to the division by 10 method, the correspond ...

Posted by stan801003 on Sun, 28 Nov 2021 03:27:06 -0800

[classical sorting algorithm] 1-bubble sorting

1. Bubble sorting idea The idea of bubble sorting is to compare two numbers from the first number and exchange them in reverse order. After a comparison, the largest number will be exchanged to the last, that is, the largest number will sink to the bottom, which is similar to the largest bubble at the bottom of the pool (on the contrary, t ...

Posted by eneyas on Sat, 27 Nov 2021 22:10:33 -0800

LeetCode sword finger Offer II linked list (021-029)

021. Delete the penultimate node of the linked list Title: Given a linked list, delete the penultimate node of the linked list, and return the head node of the linked list. Example: Input: head = [1,2,3,4,5], n = 2 Output: [1,2,3,5] Idea: Fast and slow pointers: the slow pointer is the head node, the difference between the f ...

Posted by golfromeo on Sat, 27 Nov 2021 21:14:57 -0800