[Kenchon book to Python] "Train your problem-solving skills! Algorithms and data structures" I tried to rewrite the posted code in Python! -table of contents-

Introduction

Kenchon-san, which has posted many easy-to-understand and interesting articles about algorithms and competitive programming on Qiita, has published a book! Congratulations! !! !! !!

** Train problem-solving skills! Algorithm and data structure ** けんちょん本画像.png Kenchon book Amazon site

This book is easy to understand and enjoyable to read, with abundant diagrams, explanations, and examples of algorithms and data structures. As a sluggish competition professional er who participates in AtCoder, which has been becoming more difficult in recent years, I definitely want to wear the algorithm of this book! I thought so, but it's a waste to just copy sutras and scan them normally. Therefore, I decided to rewrite the posted code to the Python I usually use. We will publish it as a reminder and maintain motivation. I hope it will be of some help to you!

This is the first Qiita article, so please forgive me if there are any points that are difficult to read. We would be grateful if you could point out bugs, give us your opinions, and give us advice (if possible, kindly)!

table of contents

Chapter 1

No code

Chapter 2

https://qiita.com/KevinST/items/cb926022777d2b0f3cfd

Chapter 3

https://qiita.com/KevinST/items/4d04dc7369880670a63b

Chapter 4

https://qiita.com/KevinST/items/f846d57e56242c6e1293

The following article has not been created. We will update it as it progresses!

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Other Remarks

――Basically, it is assumed that you read ** while looking at Kenchon-san's book ** -It does not describe the end-of-chapter problem (and I may write an article if requested) --Created in the following environment: Python3.7.4 (Anaconda), Windows10, Pycharm ――The test cases are basically taken from the Kencho book, but some of the test cases that are not mentioned are made by myself. ――I sometimes post supplements. I would be grateful if you could refer to it if you like.

Recommended Posts

[Kenchon book to Python] "Train your problem-solving skills! Algorithms and data structures" I tried to rewrite the posted code in Python! -table of contents-
[Kenchon book to Python]-Chapter 3- "Train your problem-solving skills! Algorithms and data structures" I rewrote the posted code to Python!
[Kenchon book to Python]-Chapter 2- "Train your problem-solving skills! Algorithms and data structures" I rewrote the posted code to Python!
[Kenchon book to Python]-Chapter 4-"Train your problem-solving skills! Algorithms and data structures" I rewrote the posted code to Python!
"Book to train programming skills to fight in the world" Python code answer example --1.4 Permutation of sentences
"A book to train programming skills to fight in the world" Python code answer example --1.9 Rotation of strings
"Book to train programming skills to fight in the world" Python code answer example --1.3 URLify
"Book to train programming skills to fight in the world" Python code answer example --2.6 palindrome
"A book to train programming skills to fight in the world" Python code answer example --1.2 Count the number of the same characters
"Book to train programming skills to fight in the world" Python code answer example --2.4 Splitting the list
"Book to train programming skills to fight in the world" Python code answer example --2.7 intersecting nodes
"A book to train programming skills to fight in the world" Python code answer example --1.8 "0" matrix
"A book to train programming skills to fight in the world" Python code Solution example --2.5 The sum of two numbers shown in the list
I wrote the code to write the code of Brainf * ck in python
"A book to train programming skills to fight in the world" Python code Solution example --1.6 String compression
"A book to train programming skills to fight in the world" Python code solution example --1.5 One-shot conversion
"A book to train programming skills to fight in the world" Python code answer example --3.1 Three stacks
"A book to train programming skills to fight in the world" Python code Solution example --1.7 Matrix rotation
"A book to train programming skills to fight in the world" Python code Solution example --2.8 Loop detection
"Book to train programming skills to fight in the world" Python code solution example --- Removed elements between 2.3
"Book to train programming skills to fight in the world" Python code Solution example --2.1 Remove duplicate elements
I tried to summarize the contents of each package saved by Python pip in one line
I tried to get the authentication code of Qiita API with Python.
I tried to verify and analyze the acceleration of Python by Cython
"A book to train programming skills to fight in the world" Python code answer example --1.1 Duplicate character string
I tried to open the latest data of the Excel file managed by date in the folder with Python
I tried to get and analyze the statistical data of the new corona with Python: Data of Johns Hopkins University
I tried to refactor the template code posted in "Getting images from Flickr API with Python" (Part 2)
"A book to train programming skills to fight in the world" Python code answer example --2.2 Returns the Kth from the back
I tried to refactor the code of Python beginner (junior high school student)
[Linux] I learned LPIC lv1 in 10 days and tried to understand the mechanism of Linux.
I tried to automate the article update of Livedoor blog with Python and selenium.
[First data science ⑥] I tried to visualize the market price of restaurants in Tokyo
I tried to compare the processing speed with dplyr of R and pandas of Python
I tried to graph the packages installed in Python
Not being aware of the contents of the data in python
I tried to summarize the string operations of Python
I tried to get the number of days of the month holidays (Saturdays, Sundays, and holidays) with python
[Super easy! ] How to display the contents of dictionaries and lists including Japanese in Python
I tried to create a Python script to get the value of a cell in Microsoft Excel
I also tried to imitate the function monad and State monad with a generator in Python
I wrote a doctest in "I tried to simulate the probability of a bingo game with Python"
I tried to find the entropy of the image with python
I tried the accuracy of three Stirling's approximations in python
I tried to summarize the code often used in Pandas
I tried to illustrate the time and time in C language
I tried programming the chi-square test in Python and Java.
[Python] I tried to visualize the follow relationship of Twitter
I tried to implement the mail sending function in Python
I want to know the features of Python and pip
[Python] I tried collecting data using the API of wikipedia
I tried to enumerate the differences between java and python
I tried to implement blackjack of card game in Python
I tried to remodel the code of Python beginner (junior high school student) into object-oriented crunchy
I tried to find out the difference between A + = B and A = A + B in Python, so make a note
I tried fitting the exponential function and logistics function to the number of COVID-19 positive patients in Tokyo
Solving AOJ's Algorithm and Introduction to Data Structures in Python -Part1-
I tried to solve the ant book beginner's edition with python
processing to use notMNIST data in Python (and tried to classify it)
[Introduction to Python] I compared the naming conventions of C # and Python.
Output the contents of ~ .xlsx in the folder to HTML with Python