Commit Graph

1536 Commits

Author SHA1 Message Date
CascadingCascade 5bf2c42bff
feat: add Patience Sort algorithm (#1212)
* updating DIRECTORY.md

* updating DIRECTORY.md

* feat: Add Patience Sort

https://en.wikipedia.org/wiki/Patience_sorting

* updating DIRECTORY.md

* Update sorting/patience_sort.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/patience_sort.c

Co-authored-by: David Leal <halfpacho@gmail.com>

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-20 16:47:26 -06:00
wtz 521db035ca
docs: fix minor typos in `data_structures/avl_tree.c` (#1218) 2023-02-20 16:19:47 -06:00
Alexander Pantyukhin 2d505ccf13
add leetcode Permutation in String (#1207)
* add leetcode Permutation in String

* updating DIRECTORY.md

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update leetcode/src/567.c

Co-authored-by: Stepfen Shawn <m18824909883@163.com>

* Update 567.c

fix review notes

* Update 567.c

remove redundant line

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: Stepfen Shawn <m18824909883@163.com>
2023-02-06 04:52:24 -06:00
Alexander Pantyukhin 4830210f69
add leetcode Verifying an Alien Dictionary (#1205)
* add leetcode Verifying an Alien Dictionary

* updating DIRECTORY.md

* Update 953.c

add blank line at the end

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-04 12:51:01 +00:00
Alexander Pantyukhin 55f73501ea
feat: add Distribute Coins in Binary Tree LeetCode (#1206)
* add leetcode Distribute Coins in Binary Tree

* updating DIRECTORY.md

* Update 979.c

fix review notes

* Update leetcode/src/979.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update leetcode/src/979.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update leetcode/src/979.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update leetcode/src/979.c

Co-authored-by: David Leal <halfpacho@gmail.com>

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-03 18:11:43 -06:00
CascadingCascade 55d8023f06
feat: add matrix chain order (#1198)
* feat: add Matrix Chain Order

* updating DIRECTORY.md

* Update dynamic_programming/matrix_chain_order.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update dynamic_programming/matrix_chain_order.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update dynamic_programming/matrix_chain_order.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update matrix_chain_order.c

* chore: apply suggestions from code review

* chore: apply suggestions from code review

* updating DIRECTORY.md

* Update dynamic_programming/matrix_chain_order.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* updating DIRECTORY.md

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-02-03 12:38:35 -06:00
Alexander Pantyukhin 9fa578d4b5
feat: add N-th Tribonacci number (#1202)
* add leetcode n-th Tribonacci number

* updating DIRECTORY.md

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-02-02 19:58:32 -06:00
Alexander Pantyukhin e2b8a617d6
feat: add Find the Town Judge LeetCode problem (#1199)
* add leetcode Find the Town Judge

* updating DIRECTORY.md

* Update leetcode/src/997.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-01-31 13:26:17 -06:00
Aybars Nazlica e8d3811f12
feat: add hamming distance (#1200)
* feat: add hamming distance

* Update misc/hamming_distance.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update misc/hamming_distance.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* Add curly braces to the while loop

* Fix character comparison

* Add a one-line description for library/header

* Update misc/hamming_distance.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Fix function names in test

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-01-31 13:24:50 -06:00
Alexander Pantyukhin 5ef38b30f6
fix: indentation for `leetcode_directory_md.py` (#1203)
* fix indentation for leetcode_directory_md.py

* small fix
2023-01-31 13:14:36 -06:00
Alexander Pantyukhin 88d29872f9
feat: add LeetCode Pow(x, n) (#1194)
* add leetcode Pow(x, n)

* Update 50.c

fix comment

* Update 50.c

simplification

* add lower_bound const.

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-01-23 23:06:49 -06:00
Alexander Pantyukhin 90d7d81807
feat: Add LeetCode directory writer (#1187)
* add leetcode_directory_writer

* updating DIRECTORY.md

* Update leetcode_directory_md.py

add script header

* updating DIRECTORY.md

* updating DIRECTORY.md

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* updating DIRECTORY.md

* Update .github/workflows/leetcode_directory_writer.yml

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update scripts/leetcode_directory_md.py

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update scripts/leetcode_directory_md.py

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update scripts/leetcode_directory_md.py

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* fix formating

* updating DIRECTORY.md

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-01-23 11:24:50 -06:00
Alexander Pantyukhin 74ef8f5806
feat: add Binary Tree Maximum Path Sum (#1179)
* add leetcode Binary Tree Maximum Path Sum

* Update leetcode/src/124.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-01-21 18:42:07 -06:00
Satvik 5ac30afa86
feat: add LeetCode problem 75 (#1113)
* added leetcode problem 75

* Update 75.c

resolved issues

* Update 75.c

* updating DIRECTORY.md

* Update 75.c

Removed the header file

* chore: apply suggestions from code review

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-01-20 17:50:49 -06:00
Alexander Pantyukhin a680c83b83
feat: add Maximum Ice Cream Bars (#1197)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-20 17:49:15 -06:00
Alexander Pantyukhin 17b7131873
add leetcode Maximum Bags With Full Capacity of Rocks (#1196)
* add leetcode Maximum Bags With Full Capacity of Rocks

* Update leetcode/src/2279.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update leetcode/src/2279.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update leetcode/src/2279.c

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-20 17:48:26 -06:00
Alexander Pantyukhin b98296e02f
feat: add Determine if Two Strings Are Close (#1192)
* add leetcode Determine if Two Strings Are Close

* Update 1657.c

add comments

* Update leetcode/src/1657.c

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-20 17:46:02 -06:00
Alexander Pantyukhin 73913ac4a8
feat: add Find the Smallest Divisor Given a Threshold (#1175)
* add leetcode Find the Smallest Divisor Given a Threshold

* Update leetcode/DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-20 17:39:35 -06:00
Alexander Pantyukhin b819ddf3e6
feat: add Frequency of the Most Frequent Element (#1195)
* add leetcode Frequency of the Most Frequent Element

* Update 1838.c

small fix

* Update leetcode/src/1838.c

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-20 15:42:23 -06:00
Alexander Pantyukhin 60a0c5947d
feat: add Difference Between Ones and Zeros in Row and Column (#1183)
* add leetcode Difference Between Ones and Zeros in Row and Column

* Update leetcode/DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-19 22:43:10 -06:00
Sindhu Inti e68296c07c
feat: add delete the Middle Node of a Linked List solution (#1023)
* feat:leetcode Delete the Middle Node of a Linked List solution (2095)

* Update README.md

* Update README.md

* Update DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-19 22:29:34 -06:00
Alexander Pantyukhin 103361de54
feat: add Keys and Rooms LeetCode problem (#1189)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-19 22:09:32 -06:00
Alexander Pantyukhin 02c01047a7
feat: add Longest Chunked Palindrome Decomposition (#1184)
* add leetcode Longest Chunked Palindrome Decomposition

* Update leetcode/src/1147.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update 1147.c

fix review

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 14:34:19 -06:00
Alexander Pantyukhin 108fbede16
feat: add Longest Square Streak in an Array (#1185)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 14:06:45 -06:00
Alexander Pantyukhin 1b6fe6ea17
feat: add Minimum Falling Path Sum (#1182)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 13:54:30 -06:00
Alexander Pantyukhin 36d1b265a7
feat: add Redundant Connection (#1181)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 13:15:47 -06:00
Alexander Pantyukhin 78d083fd84
feat: add Maximum Difference Between Node and Ancestor (#1180)
* add leetcode Maximum Difference Between Node and Ancestor

* chore: fix Markdown ordering

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 13:15:20 -06:00
Alexander Pantyukhin 8cbb76a02b
feat: add Number of Laser Beams in a Bank (#1174)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-18 13:13:06 -06:00
ms3939 3014b7352d
feat: improve the Singly Link List implementation (#1092)
* Update singly_link_list_deletion.c

Delete function is updated to delete at any required position (not only first)

* Update singly_link_list_deletion.c

The code is changed as per the suggestions. Please lat me know if there are any changes to be done
Thank you

* Update singly_link_list_deletion.c

The code is changed as per the suggestions. Please let me know if there are any changes to be done
Thank you..

* Update singly_link_list_deletion.c

I added inserting at any input location . Please let me know if changes need to be done

* Update singly_link_list_deletion.c

* Update singly_link_list_deletion.c

I updated self tests for both insert and delete functions properly. Please let me know if any changes need to be done
Thank you

* Update singly_link_list_deletion.c

As per your suggestions I updated the code. Please let me know if any changes need to be done..

* chore: apply suggestions from code review

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-05 17:28:08 -06:00
Alexander Pantyukhin 1a5b5f522f
feat: add LeetCode folder labeler (#1191)
* add labeler for Leetcode changes folder

* Update labeler.yml

add end line

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-05 17:24:30 -06:00
Saad H 60310deb9e
feat: add `process_scheduling_algorithms` to CMake (#1193)
* Update CMakeLists.txt

* Create CMakeLists.txt

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-28 14:35:41 -06:00
Alexander Pantyukhin b8a8807585
feat: add Minimum Average Difference (#1171)
* add leetcode Minimum Average Difference

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2022-12-27 11:45:39 -06:00
Alexander Pantyukhin bed955ed40
feat: add Max Increase to Keep City Skyline (#1173)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-27 01:21:10 -06:00
itskurtz a4e7b7bc4b
feat: add LCS algorithm (#1164)
* feat: add lcs dynamic programming algorithm

* updating DIRECTORY.md

* updating DIRECTORY.md

* fix: fix unused parameters in lcs algorithm

* fix: lcs algorithm typo removed unused parameter in test

* Update dynamic_programming/lcs.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update dynamic_programming/lcs.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update dynamic_programming/lcs.c

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: comments accoring to guidelines in lcs algorithm

* fix: doxygen standards

* chore: apply suggestions from code review

* updating DIRECTORY.md

Co-authored-by: Scott Evans <scotty@kurtz.waterfall>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2022-12-23 19:46:51 -06:00
Defective Detective 56b72da9fb
chore: move various `misc` folder... (#1177)
...algorithms to the `math` folder.

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-22 11:26:50 -06:00
Alexander Pantyukhin 0618d4d007
feat: add H-Index LeetCode problem (#1188)
* add leetcode H-Index

* Update leetcode/src/274.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update 274.c

fix review notes.

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2022-12-21 22:42:07 -06:00
Taj cafd06725c
feat: Use the new `filename_formatter` workflow (#1190)
* updating DIRECTORY.md

* using script action for filename formatting

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2022-12-21 22:39:23 -06:00
David Leal ad24ee1273
chore: use latest CMake subfolder name 2022-12-21 09:04:33 -06:00
David Leal 3be7198f03
docs: add guide on integrating CMake (#1163)
* updating DIRECTORY.md

* docs: add guide on integrating CMake

* chore: apply suggestions from code review

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2022-12-21 08:54:33 -06:00
Alexander Pantyukhin 7aae73495f
feat: add Lowest Common Ancestor of a Binary Tree (#1155)
* add leetcode Lowest Common Ancestor of a Binary Tree

* Update leetcode/src/236.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* fix function nam

* update struct name.

* add comments

* Update leetcode/src/236.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-21 08:46:34 -06:00
Alexander Pantyukhin 9f1591fbd2
feat: add Sudoku Solver LeetCode (#1162)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-21 08:44:43 -06:00
Alexander Pantyukhin 0169283f55
feat: add Number of Ways to Select Buildings (#1140)
* add Number of Ways to Select Buildings

* Update 2222.c

add new line at the end

* Rename README.md to DIRECTORY.md

* Update leetcode/src/2222.c

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* fix review notes

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2022-12-18 21:34:24 -06:00
David Leal af0ffcbd42
feat: improve the Awesome Workflow (#1186)
* feat: improve the Awesome Workflow

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* updating DIRECTORY.md

* chore: remove/add a few spaces

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2022-12-17 19:27:04 -06:00
Alexander Pantyukhin 50349e065e
feat: add Word Search LeetCode problem (#1160)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-16 20:28:51 -06:00
Alexander Pantyukhin 496e012c70
feat: add Kth Smallest Element in a BST (#1157)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-16 20:24:33 -06:00
Alexander Pantyukhin bf94aff668
feat: add Determine if String Halves Are Alike LeetCode (#1168)
* add leetcode Determine if String Halves Are Alike

* fix variable  name

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-16 15:43:25 -06:00
Alexander Pantyukhin 1d07d142d0
feat: add Number of Ways to Split Array LeetCode (#1165)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-16 15:42:57 -06:00
Alexander Pantyukhin 8992d267ac
feat: add Longest Valid Parentheses LeetCode problem (#1166)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-12-16 15:37:54 -06:00
David Leal 1d4ccc39a9
chore: remove LGTM and fix...
...CodeQL badge.
2022-12-16 15:22:46 -06:00
David Leal c45b6faa24
docs: remove unneeded Markdown header 2022-12-16 15:21:52 -06:00