LeetCode 416. Segmentation and subsets

So far, I have written more than 600 algorithm problems, some of which have been sorted into pdf documents. At present, there are more than 1000 pages (and will continue to increase), which can be downloaded for free Download link: https://pan.baidu.com/s/1hjwK0ZeRxYGB8lIkbKuQgQ Extraction code: 6666 We talked about it earlier 520, backtrac ...

Posted by Desertwar on Sun, 26 Sep 2021 18:18:18 -0700

day9 - string job

Enter a string and print all characters in odd bits (subscripts are characters in bits 1, 3, 5, 7...) For example: input * *'abcd1234 '* * output * *'bd24'** # str1 = input('Please enter a string: ') str1 = 'abcd1234' for index in range(1 ,len(str1)+1,2): print(str1[index],end='') print() Enter the user name and judge whether the user na ...

Posted by andynick on Sun, 26 Sep 2021 12:57:10 -0700

Current limiting: principle and practice of three algorithms: counter, leakage bucket and token bucket

https://www.cnblogs.com/crazymakercircle/p/15187184.html Current limiting Current limit is a common interview question in the interview. Why limit current In short Current limiting is used in many scenarios to limit concurrency and requests, such as second killing and rush buying, and to protect their own systems and downstream systems from ...

Posted by stuart7398 on Sun, 26 Sep 2021 12:03:12 -0700

479 additive binary tree (interval dp)

1. Problem Description: Let the middle order traversal of a binary tree with n nodes be (1, 2, 3,..., n), where the numbers 1, 2, 3,..., n are the node numbers. Each node has a score (all positive integers). Note that the score of the ith node is di, and each subtree of the tree and its subtree has a bonus. The bonus calculation method of any ...

Posted by jheitz on Sun, 26 Sep 2021 11:09:06 -0700

BSGS and extended BSGS

summary It is mainly used to solve the an=b(mod p) problem and solve the minimum non negative integer n to satisfy the left formula. Ordinary BSGS can solve the case of a and P coprime, and extended BSGS can solve the case of non coprime Common BSGS Problem solving steps 1. Take m=ceil(sqrt §) (rounded up). If the solution exists, ...

Posted by EZE on Sat, 25 Sep 2021 22:11:21 -0700

Quick sorting of 200 cases 66 for Java beginners

Introduction to the author Author name: Ming Shiyin in programming world Introduction: CSDN blog expert has been engaged in software development for many years and is proficient in Java and JavaScript. Bloggers also learn and grow step by step from scratch, know the importance of learning and accumulation, and like to fight and upgrade with ...

Posted by colossus_09 on Sat, 25 Sep 2021 17:28:59 -0700

❤️ [data structure] dynamic graph + 10000 character detailed explanation stack and queue (dynamic graph + example) [recommended collection] ❤️

🎈 Author: Linux ape 🎈 Introduction: CSDN blog expert 🏆, Huawei cloud sharing expert 🏆, C/C + +, interview, question brushing and algorithm. Please consult me, pay attention to me and chat privately if you have any questions! 🎈 Attention column: C/C + + interview customs collection   (high quality articles are constantly updated ...

Posted by hardyvoje on Sat, 25 Sep 2021 15:30:22 -0700

Summary of Java implementation of various sorting algorithms for arrays

PS: the author is Xiaobai who is learning Java. Here we will summarize some knowledge related to Java (Java code implementation). If there are deficiencies, welcome to discuss and correct them. Thank you very much!!! Summary of Java implementation of various sorting algorithms for arrays 0 sorting algorithm description 0.0 overview Sear ...

Posted by DexterMorgan on Sat, 25 Sep 2021 11:40:48 -0700

New features in C++11

New features in C++11 Article catalog 1, Range based for loop C++ 11 provides a special version of the for loop. In many cases, it can simplify the processing of arrays, which is the range based for loop. When working with an array using a range based for loop, the loop can automatically iterate once for each element in the ...

Posted by AustinP on Sat, 25 Sep 2021 10:43:14 -0700

Unit 6 dynamic programming 6.1 example: Digital triangle

6.1 example: Digital triangle   [problem description] there is a digital triangle with layer number n (n ≤ 1000) (as shown in the figure below). There is an ant walking down from the top floor. When walking down one level, it can go down left or right. Find the maximum value of the sum of the numbers it passes through after going to th ...

Posted by Cut on Fri, 24 Sep 2021 21:02:29 -0700