Commit graph

190 commits

Author SHA1 Message Date
krahets
5392afd44b fix several bugs 2023-10-17 23:45:31 +08:00
krahets
a8c624fa5a Fix the code in min_path_sum 2023-10-14 03:25:11 +08:00
krahets
da5ef293d9 fix a typo 2023-10-11 17:39:56 +08:00
krahets
fb552987f5 Update variable names in list and my_list 2023-10-09 18:20:42 +08:00
krahets
ff8e7ceec5 Several bug fixes. 2023-09-24 20:38:21 +08:00
krahets
e3773b7f76 Several bug fixes and improments. 2023-09-24 19:35:32 +08:00
jmin
26bf0c5a78
feat: Add javascript and typescript code in chapter_computational_com… (#780)
* feat: Add javascript and typescript code in chapter_computational_complexity

* docs: Update code comment

* style: update code order th same with java
2023-09-24 03:17:19 -05:00
Reese Wellin
a6a1036dc9
fix(JS, TS): chapter_sorting QuickSortMedian and QuickSortTailCall example (#785) 2023-09-24 03:14:28 -05:00
Justin Tse
2f727d895d
Fix JS and TS sort bugs (#784) 2023-09-23 14:14:44 -05:00
krahets
8effa58a59 Several bug fixes. 2023-09-20 01:53:44 +08:00
krahets
cb9c14f5ff fix build_tree, binary_search_tree.cs
fix two figures
2023-09-15 02:08:09 +08:00
keshida
d5bac12f60
fix: modify a function name in array_stack.js(ts) and array_queue.js(ts) (#739)
* Update array_stack.js

判空函数名称有歧义

* Update array_stack.js

* Update array_queue.js

* Update array_stack.ts

* Update array_queue.ts

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-13 03:00:39 +08:00
krahets
2b54352bec prepare 1.0.0b5 release 2023-09-10 23:11:50 +08:00
krahets
f71b2a40da fix preorder_traversal_iii_compact code 2023-09-09 00:51:00 +08:00
krahets
dd72335235 Format C, C++, C#, Go, Java, Python, Rust code. 2023-09-02 23:54:38 +08:00
krahets
978857570f Format JS and TS code. 2023-09-02 23:07:47 +08:00
Justin Tse
f96f583771
Add Chapter greedy for JS and TS code (#718)
* Fix binary_search_tree TS code

* Update binary_search_tree js code style

* Add the JavaScript code for Chapter of Greedy

* Add the TypeScript code for Chapter of Greedy

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-02 20:20:17 +08:00
Justin Tse
89a5f4d0d7
Fix binary_search_tree TS code and update JS code style (#715)
* Fix binary_search_tree TS code

* Update binary_search_tree js code style

* Update binary_search_tree.ts

* Update avl_tree.ts

* Update binary_search_tree.ts

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-02 19:56:23 +08:00
gaofer
620bfb1f1d
Iteration and recursion code in js/ts (#703)
* feat(JS and TS):add the section of iteration and recursion

* feat(JS and TS):add the section of iteration and recursion

* feat(JS and TS):add the section of iteration and recursion
2023-09-02 16:09:13 +08:00
krahets
a47a974a6a fix climbing_stairs_constraint_dp code 2023-08-31 02:31:58 +08:00
krahets
628d8a516b fix binary_search_tree code 2023-08-31 02:31:31 +08:00
gaofer
f7ab4797bf
feat: add dynamic programming code for JS and TS (#692)
* fix: Correcting typos

* Add JavaScript and TypeScript code of dynamic programming.

* fix: Code Style

* Change ==/!= to ===/!==
* Create const by default, change to let if necessary.

* style fix: Delete unnecessary defined type
2023-08-30 15:27:01 +08:00
gaofer
1b94b77cbb
Add code in javascript and typescript. (#690)
* Add binary_search_insertion and binary_search_edge code in javascript and typescript.

* code style fix: in FOR loop, use CONST will be nicer.

* fix: Code Style

* Change ==/!= to ===/!==
* Create const by default, change to let if necessary.
* Update import files

* Update codes/javascript/chapter_searching/binary_search_edge.js

Co-authored-by: Justin Tse <xiefahit@gmail.com>

* style fix: Delete unnecessary defined type

---------

Co-authored-by: Justin Tse <xiefahit@gmail.com>
2023-08-30 05:21:47 +08:00
krahets
9731a46d67 Fix a definition. 2023-08-27 00:50:18 +08:00
krahets
f5dda8d99a Polish the content 2023-08-21 03:06:53 +08:00
krahets
2626de8d0b Polish the chapter
introduction, computational complexity.
2023-08-20 14:51:39 +08:00
krahets
c310edb672 Polish the chapter of array and linkedlist 2023-08-17 05:13:19 +08:00
Justin Tse
5d7e0a59b1
Add JavaScript and TypeScript code of top_k and update some code style (#686)
* Update JS and TS code style

* Add JavaScript and TypeScript code of top_k

* Update top_k.ts

* Apply suggestions from code review

Co-authored-by: Justin Tse <xiefahit@gmail.com>

* Apply suggestions from code review

Co-authored-by: Justin Tse <xiefahit@gmail.com>

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-08-17 05:00:35 +08:00
William Yuan
ec82be7dc2
feat(tree): Add the array representation of the binary tree(js,ts) (#681)
* fix: fixed the bug of arrToTree function

* feat(tree): Add the array representation of the binary tree(js,ts)

* refactor: Make the arrToTree method match the method in java
2023-08-13 19:30:50 +08:00
William Yuan
e97eee0e18
feat(chapter_hashing): Add js and ts codes for chapter hashing (#675)
* refactor(chapter_hashing): Remove unnecessary chaining operator

* feat(chapter_hashing): Add js and ts codes for chapter 6

* refactor(chapter_hashing): Optimize the remove function logic

* refactor(chapter_hashing): Remove unnecessary chaining operator

* refactor(chapter_hashing): use const instead of let
2023-08-10 23:04:41 +08:00
krahets
932d14644d Polish the content
Polish the chapter preface, introduction and complexity anlysis
2023-08-08 23:16:33 +08:00
krahets
08e4924054 Finetune 2023-08-04 05:25:22 +08:00
Yudong Jin
71074d88f6
Add the section of binary search insertion. (#671)
Refactor the section of binary search edge.
Finetune the figures of binary search.
2023-08-04 05:16:56 +08:00
William Yuan
70784a1ec3
feat(chapter_backtracking): Add js and ts codes for chapter 13.3 (#667)
* feat(chapter_dynamic_programming): Add js and ts codes for chapter 14.1

* style(chapter_dynamic_programming): format code

* refactor(chapter_dynamic_programming): remove main definition and add type

* feat(chapter_backtracking): Add js and ts codes for chapter 13.3

* feat(chapter_divide_and_conquer): Add js and ts codes for chapter 12.2

* feat(chapter_divide_and_conquer): Add js and ts codes for chapter 12.3

* feat(chapter_divide_and_conquer): Add js and ts codes for chapter 12.4

* style(chapter_divide_and_conquer): fix typo

* refactor: Use === instead of == in js and ts
2023-08-03 14:44:49 +08:00
William Yuan
35e9c8c209
feat(chapter_dynamic_programming): Add js and ts codes for chapter 14.1 (#658)
* feat(chapter_dynamic_programming): Add js and ts codes for chapter 14.1

* style(chapter_dynamic_programming): format code

* refactor(chapter_dynamic_programming): remove main definition and add type
2023-07-29 02:06:11 +08:00
krahets
b067016bfa Update preorder_traversal_iii. 2023-07-25 16:39:38 +08:00
krahets
bba62bbe75 Fix the code of preorder_traversal_iii_compact 2023-07-21 22:08:26 +08:00
krahets
c54536d1a1 Modify the problem of preorder_traversal_iii 2023-07-19 16:37:12 +08:00
krahets
69920a0599 Fix binary search.
Finetune a figure in intro_to_dp.
2023-07-01 20:07:21 +08:00
krahets
9fc1a0b2b3 Update n_queens code. 2023-06-21 02:56:28 +08:00
krahets
d62156fb58 Fix two_sum.js and .ts 2023-06-16 21:28:48 +08:00
Yudong Jin
9563965a20
Add the codes of hashmap (#553)
of chaining and open addressing
2023-06-14 02:01:06 +08:00
krahets
0345a479a4 Fix some codes. 2023-06-06 02:03:27 +08:00
krahets
698c2e7fe5 Fix some codes and a figure. 2023-06-05 01:03:39 +08:00
Justin Tse
2532f06c7f
Add JavaScript and TypeScript code of heap sort, selection sort and binary search edge and Fix the indentation of TS code (#545)
* Fix the indentation of TS code

* Add JavaScript and TypeScript code of heap sort, selection sort and binary search edge

* Fix the style of JS and TS code
2023-06-05 00:20:11 +08:00
krahets
b39e79be85 Fix remove() in binary search tree. 2023-05-26 20:34:22 +08:00
krahets
11c835d79c Update the section of heap. 2023-05-25 20:25:19 +08:00
krahets
eb8df49993 Update bubble sort and insertion sort. 2023-05-23 21:20:14 +08:00
krahets
89a9741e9e Fix some comments. 2023-05-22 23:13:54 +08:00
krahets
f6d290d903 Update the comments of bubble sort
and insertion sort
2023-05-22 23:05:37 +08:00