Commit graph

2040 commits

Author SHA1 Message Date
Yudong Jin
ee485372fe
feat: Add pythontutor blocks to the rest of the chapters (#1030)
* Fix Python code

* Add the pythontutor blocks of the chapter tree, heap, graph, searching, sorting, divide and conquer, dynamic programming and greedy.
Improve the pythontutor blocks of the chapter array and linkedlist and backtracking.
Add the tutorial of pythontutor in how-to-read section.

* Reduce the image's file size.
2024-01-07 23:49:26 +08:00
Yudong Jin
ddd375af20
feat: Add visualizing code blocks based on the pythontutor (#1029)
* Update copyright

* Update the Python code

* Fix the code comments in ArrayBinaryTree

* Fix the code comments in ArrayBinaryTree

* Roll back time_comlexity.py

* Add the visualizing code(pythontutor) blocks to the chapter complexity, data structure, array and linked list, stack and queue, hash table, and backtracking

* Fix the code comments
2024-01-07 04:04:01 +08:00
Justin Tse
0f5b924036
Fix: recursion bug for JS and TS (#1028) 2024-01-06 16:29:39 +08:00
K3v123
edf3f3e33a
translation: Update index.md (#1009)
* Update index.md

improved the abstract.

* Update index.md

redid the sentences, if this one is no good then I will just use what Yuelinxin has provided me.
thanks and sorry for the inconvenience, also happy new year!

* Update index.md

deleted sinuous.
2024-01-06 14:48:09 +08:00
易春风
ad663615e6
Fix the issues of discusscomment 7949412 and 7985550 (#1027) 2024-01-06 14:47:32 +08:00
Spark
a280c3d26e
translation: chapter_preface/suggestions.md (#999)
* Translate chapter_preface/suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

* Update suggestions.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-01-06 02:26:17 +08:00
ElbertYang
175e6d98d8
translation: Update chapter_data_structure/number_encoding.md (#1012)
* Updata number_encoding.md

* Update number_encodimg.md
2024-01-06 02:25:40 +08:00
th1nk3r-ing
d06503b50b
fix(cpp): cmake compile my_list.cpp for target list (#1025) 2024-01-05 17:29:53 +08:00
Yuelin Xin
63efa3234c
translation: update chapter_data_structure/basic_data_types.md (#1018)
* refine preface index and about_the_book

* update about_the_book

* address suggestions in #997 review

* Update about_the_book.md

* update about_the_book

* Update about_the_book.md

* refine translation of basic_data_types.md

* updated basic_data_types.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-01-04 02:50:17 +08:00
Yudong Jin
5866d275ff
Fix two figures (#1024)
* Fix two figures

* Fix a figure
2024-01-04 02:48:48 +08:00
gonglja
3a559f1b60
Fix some code bugs (#1021)
* fix(counting_sort.c): Fix access out-of-bounds issue

* fix(hash_map_open_addressing.c): Fix coding errors

* fix(binary_search_tree.c): Fix unreleased memory

* Update indentataion
2024-01-02 21:45:01 +08:00
krahets
ef40418129 Update README and the contributors information 2024-01-02 15:14:42 +08:00
Yudong Jin
e4252d5733
Update the figures and cover images (#1020)
* Update all the figures

* Update the data structure, sorting, divide and conquer chapters' covers. Add the English edition covers.

* Fix the link of EN translation in README

* Update README.md

* Update README.md

* Update README-en.md
2024-01-02 15:06:44 +08:00
codingonion
7ffef7e1d6
update the author info sjinzh -> codingonion (#1017)
* update author information

* Update index.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-01-02 01:25:37 +08:00
K3v123
0a3d66beb4
translation: Update classification_of_data_structure.md (#1005)
* Update classification_of_data_structure.md

refined some parts here and there.
Overall its pretty accurate anyways.
Merry Christmas everyone!

* Update classification_of_data_structure.md

I tried to fix most of the stuff listed, um some the empty spaces looks different from the editor view, so its a bit hard to see, not sure if i did it correct or not. thanks again for the review Krahets

* Update classification_of_data_structure.md

Made changes to to what Yuelinxin and Krahets pointed out.
Deleted extra lines.
again thanks and sorry for my inadvertence.

* Update classification_of_data_structure.md

re-edited, with changes that Phoenix0415 has mentioned.
thank you so much for the review Phoenix!

* Update classification_of_data_structure.md

After having another skim through, I realized that I have misunderstood, what  Phoenix is saying, so I recap'd the bold ones again.
sorry for the inconvenience

* Update classification_of_data_structure with Grammarly

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-01-02 01:02:29 +08:00
hpstory
9c0bb55150
fix(csharp): unified array statement (#1011) 2023-12-28 18:06:43 +08:00
Yudong Jin
f68bbb0d59
Update the book based on the revised second edition (#1014)
* Revised the book

* Update the book with the second revised edition

* Revise base on the manuscript of the first edition
2023-12-28 18:06:09 +08:00
Yudong Jin
19dde675df
translation: Add the initial translation of the array and linked list chapter (#1008)
* Add the translation of the data structure chapter. Synchronize the headings in mkdocs-en.yml

* Fix a typo

* Add the translation of the array and linked-list chapter
2023-12-27 00:42:55 +08:00
Yudong Jin
42523b8879
translation: Add the translation of the data structure chapter (#1007)
* Add the translation of the data structure chapter. Synchronize the headings in mkdocs-en.yml

* Fix a typo
2023-12-26 18:28:26 +08:00
易春风
1ee0a7a7bf
Fix the issue of discusscomment 7938404 (#1006) 2023-12-26 16:40:57 +08:00
krahets
774c27c47e A bug fix 2023-12-25 13:23:32 +08:00
krahets
627ced805f Update the translation results of the preface and introduction chapters to the laest main branch 2023-12-25 02:36:52 +08:00
K3v123
6dcf0d172a
Update index.md (#1000)
changed a bit of the abstract part.
2023-12-24 13:34:07 +08:00
Yuelin Xin
a97aee6a02
translation: refine preface index and about_the_book (duplicates from #997) (#1003)
* refine preface index and about_the_book

* update about_the_book

* address suggestions in #997 review

* Update about_the_book.md

* update about_the_book

* Update about_the_book.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-12-24 13:21:49 +08:00
K3v123
060a028008
translation: Update algorithms_are_everywhere.md (#998)
* Update algorithms_are_everywhere.md

I made changes to yuelinxin's suggestions.
again thank you so much for your suggestion yuelinxin!

* Update algorithms_are_everywhere.md
2023-12-24 10:49:38 +08:00
Yudong Jin
9d9d9e74b9
translation: Update the complexity analysis chapter to the main branch (#1001)
* Update buttons.

* Update button svg

* Update button

* Update README.md

* Update index.md

* Update translation of about_the _book

* Update English headings.

* Update the translation of chapter comlexity analysis to main branch.
2023-12-24 10:47:06 +08:00
Yudong Jin
6d961d38a0
Several improvements (#1002)
* Update buttons.

* Update button svg

* Update button

* Update README.md

* Update index.md

* Update translation of about_the _book

* Update English headings.
2023-12-24 10:37:25 +08:00
易春风
b115a2b895
Fix the issue of discuss comment 7919887 (#996) 2023-12-23 23:20:26 +08:00
Yudong Jin
46813a5247
translation: English Translation of the chapter of preface(part), introduction and complexity analysis(part) (#994)
* Translate 1.0.0b6 release with the machine learning translator.

* Update Dockerfile
A few translation improvements.

* Fix a badge logo.

* Fix EN translation of chapter_appendix/terminology.md (#913)

* Update README.md

* Update README.md

* translation: Refined the automated translation of README (#932)

* refined the automated translation of README

* Update index.md

* Update mkdocs-en.yml

---------

Co-authored-by: Yudong Jin <krahets@163.com>

* translate: Embellish chapter_computational_complexity/index.md (#940)

* translation: Update chapter_computational_complexity/performance_evaluation.md (#943)

* Update performance_evaluation.md

* Update performance_evaluation.md

* Update performance_evaluation.md

change 'methods' to 'approaches' on line 15

* Update performance_evaluation.md

on line 21, change the sentence to 'the results could be the opposite on another computer with different specifications.'

* Update performance_evaluation.md

delete two short sentence on line 5 and 6

* Update performance_evaluation.md

change `unavoidable` to `inevitable` on line 48

* Update performance_evaluation.md

small changes on line 23

* translation: Update terminology and improve readability in preface summary (#954)

* Update terminology and improve readability in preface summary

This commit made a few adjustments in the 'summary.md' file for clearer and more accessible language. "Brushing tool library" was replaced with "Coding Toolkit" to better reflect common terminology. Also, advice for beginners in algorithm learning journey was reformulated to imply a more positive approach avoiding detours and common pitfalls. The section related to the discussion forum was rewritten to sound more inviting to readers.

* Format

* Optimize the translation of
chapter_introduction/algorithms_are_everywhere.

* Add .gitignore to Java subfolder.

* Update the button assets.

* Fix the callout

* translation: chapter_computational_complexity/summary to en (#953)

* translate chapter_computational_complexity/summary

* minor format

* Update summary.md with comment

* Update summary.md

* Update summary.md

* translation: chapter_introduction/what_is_dsa.md (#962)

* Optimize translation of what_is_dsa.md

* Update

* translation: chapter_introduction/summary.md (#963)

* Translate chapter_introduction/summary.md

* Update

* translation: Update README.md (#964)

* Update en translation of README.md

* Update README.md

* translation: update space_complexity.md (#970)

* update space_complexity.md

* the rest of translation piece

* Update space_complexity.md

---------

Co-authored-by: ThomasQiu <thomas.qiu@mnfgroup.limited>
Co-authored-by: Yudong Jin <krahets@163.com>

* translation: Update chapter_introduction/index.md (#971)

* Update index.md

sorry, first time doing this... now this is the final change.
changes:
title of the chapter is shorter.
refined the abstract.

* Update index.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>

* translation: Update chapter_data_structure/classification_of_data_structure.md (#980)

* update classification_of_data_structure.md

* Update classification_of_data_structure.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>

* translation: Update chapter_introduction/algorithms_are_everywhere.md (#972)

* Update algorithms_are_everywhere.md

changed or refined parts of the words and sentences including tips.
Some of them I didnt change that much because im worried that it might not meet the requirement of accuracy. 
some other ones i changed a lot to make it sound better, but also kind of following the same wording as the CN version

* Update algorithms_are_everywhere.md

re-edited the dictionary part from Piyin to just normal Eng dictionary. 
again thank you very much hpstory for you suggestion.

* Update algorithms_are_everywhere.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>

* Prepare merging into main branch.

* Update buttons

* Update Dockerfile

* Update index.md

* Update index.md

* Update README

* Fix index.md

* Fix mkdocs-en.yml

---------

Co-authored-by: Yuelin Xin <sc20yx2@leeds.ac.uk>
Co-authored-by: Phoenix Xie <phoenixx0415@gmail.com>
Co-authored-by: Sizhuo Long <longsizhuo@gmail.com>
Co-authored-by: Spark <qizhang94@outlook.com>
Co-authored-by: Thomas <thomasqiu7@gmail.com>
Co-authored-by: ThomasQiu <thomas.qiu@mnfgroup.limited>
Co-authored-by: K3v123 <123932560+K3v123@users.noreply.github.com>
Co-authored-by: Jin <36914748+yanedie@users.noreply.github.com>
2023-12-22 00:16:18 +08:00
krahets
9a5ab776d6 A bug fix. 2023-12-19 21:55:57 +08:00
krahets
d9686e57dd Fix bubble_sort.c 2023-12-18 22:52:00 +08:00
Reanon
d0f4fa69a6
fix(go): fix go code , refer to @joengtou @wcig @shenjq (#992) 2023-12-16 18:52:28 +08:00
Yudong Jin
406eed82a3
Several bug fixes and improvements (#991)
* Several bug fixes.

* Update index.md
2023-12-16 03:15:20 +08:00
krahets
54b1ac8638 A bug fix. 2023-12-14 02:54:19 +08:00
Yudong Jin
ed4de4644f
Revised the book. (#987) 2023-12-14 02:42:53 +08:00
gonglja
d67c458caa
fix(codes/c): Fix bubble_sort.c (#983) 2023-12-11 00:42:45 +08:00
Yudong Jin
2e130d4bbc
Several bug fixes (#984)
* Fix quick_sort.md

* Disable instant loading for mathjax rendering

* Fix the summary.md of chapter_sorting

* Two bug fixes
2023-12-11 00:42:00 +08:00
Yudong Jin
b10091c5f9
Several enhancements and bug fixes (#981)
* Update the installation section.

* Fix storage_pyramid.png

* Update the landing page.

* Update index.md

* Add download buttons to the landing page.

* Update the button style.

* Update .gitignore
2023-12-06 23:26:53 +08:00
Yudong Jin
723af99fb9
Update the assets and GIF animations. (#979) 2023-12-04 03:19:48 +08:00
Yudong Jin
e720aa2d24
feat: Revised the book (#978)
* Sync recent changes to the revised Word.

* Revised the preface chapter

* Revised the introduction chapter

* Revised the computation complexity chapter

* Revised the chapter data structure

* Revised the chapter array and linked list

* Revised the chapter stack and queue

* Revised the chapter hashing

* Revised the chapter tree

* Revised the chapter heap

* Revised the chapter graph

* Revised the chapter searching

* Reivised the sorting chapter

* Revised the divide and conquer chapter

* Revised the chapter backtacking

* Revised the DP chapter

* Revised the greedy chapter

* Revised the appendix chapter

* Revised the preface chapter doubly

* Revised the figures
2023-12-02 06:21:34 +08:00
Yudong Jin
b824d149cb
fix: Several code bug fixes (#973)
* Update counting_sort.c and quick_sort.c

* Code bug fixes.
2023-11-29 23:14:55 +08:00
hpstory
56b20eff36
feat(csharp) .NET 8.0 code migration (#966)
* .net 8.0 migration

* update docs

* revert change

* revert change and update appendix docs

* remove static

* Update binary_search_insertion.cs

* Update binary_search_insertion.cs

* Update binary_search_edge.cs

* Update binary_search_insertion.cs

* Update binary_search_edge.cs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-11-26 23:18:44 +08:00
gonglja
d960c99a1f
fix: bug fixes for array_hash_map.c and counting_sort.c (#968)
* fix(codes/cpp): Memory leak fix: the space was not freed when pop removed the element.

* fix(codes/cpp): Fix access error when printArray(arr, 0)

* Update PrintUtil.hpp

* fix(codes/c): Fix some errors of cmake build

* feat(codes/c): Add hashing_search.c

* styles(codes/c): Modify function description

* styles(codes/c): Modify binary_search.c code style

* fix(codes/c): Fix the problem in binary_tree_bfs.c and the problem that the memory is not released.

* feat: Add preorder_traversal_i_compact.c

* feat(codes/c): Add head_sort.c

* feat(codes/c): Add bucket_sort.c

* feat(codes/c): Add binary_search_edge.c

* fix(codes/c): Add programs that are not managed by cmake (c code)

* feat(codes/c): Add selection_sort.c

* style(codes/c): Change swap in selection_sort.c to `selectionSort`

* styles(codes/c): Change style.

* fix(codes/c): Fix some formatting errors and temporarily remove backtracking chapters

* fix(codes/c): Fix space_complexity.c build error.

* feat(codes/c): Add array_binary_tree.c

* feat(code/c): Update push_back and pop_back in vector.h

* styles(codes/c): Adjust  format.

* feat(codes/c): Add `interation.c ` `recursion.c` `simple_hash.c` `binary_search_edge.c` `binary_search_insertion.c` in C codes.

* fix(mylist.c): Fix `insert` function in `mylist.c`

https://github.com/krahets/hello-algo/discussions/32#discussioncomment-6974163

* feat(codes/c): Add binary_search_recur.c

* fix(codes/c): Bug fixes in discussion
https://github.com/krahets/hello-algo/discussions/78\#discussioncomment-7611511
https://github.com/krahets/hello-algo/discussions/428\#discussioncomment-7637613

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-11-26 22:56:30 +08:00
krahets
f5407f2aaa Update ram_and_cache.md 2023-11-26 15:28:20 +08:00
krahets
880f233ca9 Update chapter_array_and_linkedlist/summary.md 2023-11-26 02:05:35 +08:00
krahets
020eb622b7 Add the section of ram_and_cache 2023-11-26 01:51:39 +08:00
krahets
770371527e Update quick_sort.md 2023-11-26 01:22:10 +08:00
0x6AcE
c5e37c1b41
Simplify the code in array.swift (#960)
* 简单点

* Apply suggestions from code review

Co-authored-by: nuomi1 <nuomi1@qq.com>

---------

Co-authored-by: Yudong Jin <krahets@163.com>
Co-authored-by: nuomi1 <nuomi1@qq.com>
2023-11-23 15:20:17 +08:00
selear
5b6fb34a82
fix: Use .equals() to compare two strings in Java (#961) 2023-11-21 21:20:04 +08:00
Neo
9b35f75505
fix: Initialize go empty slice (#947)
* Fix: Initialize go empty slice

* Update list.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-11-20 02:08:29 +08:00