Commit Graph

1516 Commits

Author SHA1 Message Date
David Leal
ace1c69509
fix: LeetCode guide link 2022-11-17 12:27:30 -06:00
Aryan Raj
136dee84e7
feat: add non_preemptive_priority_scheduling in Process Scheduling Algorithm (#968)
* Added NonPreemptivePriorityScheduling

* updating DIRECTORY.md

* Added documentation and tests

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Left out documentation and suggested changes

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* test case added with assert.h

* Update process_scheduling_algorithms/non_preemptive_priority_scheduling.c

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

* typedef | Snake Case naming

* chore: apply suggestions from code review

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2022-11-17 12:19:16 -06:00
Alexander Pantyukhin
856168384d
feat: add compliment of 10 integer (#1136)
* add complinent of 10  integer

* Update 1009.c

add new line at the end

* Rename README.md to DIRECTORY.md

change filename

* chore: apply suggestions from code review

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-15 18:27:22 -06:00
Jeremias Moreira Gomes
0e956c6e58
chore: add Rot13 Cipher (#1008)
* Add ROT13 cipher.

* updating DIRECTORY.md

* Fix suggestions.

* Suggestions.

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-15 18:22:16 -06:00
David Leal
21bd88215c
chore: remove redundant \ 2022-11-14 15:56:23 -06:00
ms3939
741d3f95b3
chore: fix tic_tac_toe.c CodeQL warning (#1133)
e<=8 is not needed as remainder is always less than remainder so e<9(e>=8) is obvious in every case
2022-11-14 13:10:23 -06:00
devarshitrivedi01
55b2045b19
chore: add Max Consecutive Ones in LeetCode folder (#982)
* Create 14.c

* Update README.md

* Update leetcode/src/14.c

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

* Update DIRECTORY.md

* Update DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-14 12:47:23 -06:00
Anas Khan
00500d6108
chore: add display() and improve code formatting (#975)
added display to view entire stack using for loop and formatted code.
2022-11-11 13:53:44 -06:00
Enzo Veroneze
1b3a1ca91e
fix: remove double/unintended free (#1143)
The call to realloc() already frees the previously allocated memory if necessary.
By the man page of realloc(): "f the area pointed to was moved, a free(ptr) is done.",
and free(): "If free(ptr) has already been called before, undefined behavior occurs.".
2022-11-09 23:19:01 -06:00
Yashvardhan Singh
68bdbfb0a5
feat: add LeetCode problem 10 (#1033)
* updated readme

* Create 10.c

* Update README.md

* added documentation

* chore: apply suggestions from code review

* Update DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-09 19:24:15 -06:00
David Leal
9101ccd27c
docs: add a guide for new LeetCode solutions (#1131)
* docs: add a guide for new LeetCode solutions

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-09 19:21:17 -06:00
mr-shivamgarg
0d5abe0a77
fix: add solution link to LeetCode problem 62 (#1128) 2022-11-09 13:34:14 -06:00
Shreyas Sable
154bcdb935
feat: add a vector implementation in data structures (#977)
* added a vector implementation in data structures

* changed a comment

* made the required changes

* added tests
2022-11-08 15:18:39 -06:00
Aniket Dubey
25f3b63d5b
chore: add LeetCode problem 485 (#981)
* Create 485.c

added "485. Max Consecutive Ones" solution

* Update README.md

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-08 15:08:46 -06:00
Sindhu Inti
a0f658311d
feat: leetcode Construct Binary Search Tree from Preorder Traversal solution (1008) (#1021)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-04 19:15:30 -06:00
Sindhu Inti
9ab1bc981b
feat: LeetCode Next Greater Node In Linked List solution (1019) (#1022)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-11-02 00:14:45 -06:00
utsavkhemka21
27145d7ce4
feat: add LeetCode problem 62 (#1062)
Co-authored-by: Utsav Khemka <utsav9125368000@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-10-28 20:30:13 -05:00
Adhiraj
0cd4f6b691
feat: add Leetcode problem 119 (#997)
* added 119

* added 119.c

Co-authored-by: David Leal <halfpacho@gmail.com>
2022-10-28 18:47:45 -05:00
David Leal
8fa62620c2
chore: use the DIRECTORY.md workflow from the scripts repository (#1096)
* updating DIRECTORY.md

* chore: use the scripts repository for...

...the `DIRECTORY.md` workflow. The code is much shorter now as well.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-24 14:48:49 -05:00
utsavkhemka21
1a6ed6bf1c
Add Leet Code Solution of 62 No Ques (#1061)
Co-authored-by: Utsav Khemka <utsav9125368000@gmail.com>
2022-10-22 15:35:58 +05:30
zafar hussain
9502fd54ef
chore: update to match new Discord links (#1065) 2022-10-17 20:10:52 -05:00
serturx
8241a58d42 Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-10-12 10:48:41 -04:00
serturx
7a997f2755 fix comment 2022-10-12 10:48:41 -04:00
serturx
bd1b0ebcb9 Add include descriptions 2022-10-12 10:48:41 -04:00
serturx
35f6431f47 Add algoritm description 2022-10-12 10:48:41 -04:00
github-actions
45f09db995 updating DIRECTORY.md 2022-10-12 10:48:41 -04:00
serturx
597dc1972b Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-10-12 10:48:41 -04:00
serturx
f8e43ac88f Add run length encoding 2022-10-12 10:48:41 -04:00
Sindhu Inti
a8b42d0bb8
feat: leetcode Maximum Twin Sum of a Linked List solution (2130) (#988) 2022-10-09 12:32:15 +05:30
Adhiraj
82ca460a9c
feat: add LeetCode problem 118 (#996)
* added 118 to list

* added 118.c
2022-10-05 12:31:51 -05:00
David Leal
52d3b3ee4d
docs: improve the contributing guidelines (#966)
* docs: improve the contributing guidelines

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-09-30 11:56:31 -05:00
GrandSir
6121ab5c20
Create fibonacci_formula.c (#961) 2022-09-30 14:21:43 +05:30
flyinghu
7e6276b730
Return success status (#957) 2022-09-30 14:20:08 +05:30
Shuangchi He
889931acc8
chore: fix various spelling typos (#945) 2022-09-27 10:58:15 -05:00
David Leal
b0a41bb38c
chore: update copyright notices to 2022 2022-09-07 19:13:07 -05:00
Rak Laptudirm
dad3a52b56
chore: fix typo in filename (#947) 2022-06-07 13:09:33 -05:00
Daniel Beecham
2314a19586
feat: Rewrite the trie example (#927)
The trie example had some issues;

* It did not follow the code convention in CONTRIBUTING.md
* The createTrieNode used an inefficient zeroing method (looping over
  the entries) which also does not zero out holes in the structure (e.g.
  an alternative would be to use "*node = &(TrieNode){0}", but calloc
  does all that anyway
* It used an inefficient and clumsy printArray method
* It used strlen inside the algorithm; this new method could get rid of
  any strlen/strnlen usage (inserts/searches could be sanitized by
  snprintf)
* This version can allow for a custom mapping function, e.g. if NULL is
  a valid separator (say that you want a trie for certain binary
  packages)
* The previous version actually contained out-of-bounds array indexing;
  there were no checks for out-of-bound indexing and words in the word
  list did contain out of bounds words. It's a surprise it was working
  so well.
* This version just returns 'int' to allow for error checks (instead of
  a printf inside the algorithm), and uses double pointers for return
  values (good practice)
* The usage example contained unnecessary mallocs, switched that out for
  scanf. The example is just an example after all, in real applications
  you'd have better input sanitazion.
2022-03-19 19:04:18 -06:00
Yannick Brenning
d017c3ef77
fix: update value at index and return SUCCESS (#932) (#933) 2022-01-15 01:34:55 +05:30
Dhruv Pasricha
f851fbbe2f
fix: fixed index of parent in sorting/heap_sort_2.c (#914)
* fixed index of parent

* fixed spacing to pass autochecks

* Empty commit to test the CI

Co-authored-by: Panquesito7 <halfpacho@gmail.com>
2022-01-12 00:02:09 +05:30
Nikhill Vombatkere
d8804a60ab
Remote Command Execution Using UDP Client Server Model (& Merging Branch Locally) (#930)
* TCP Full Duplex Server Client Communication

* Changes made to successfully complete 5th Check

* Update client_server/tcp_full_duplex_server.c

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

* updating DIRECTORY.md

* Update tcp_full_duplex_client.c

* Update client_server/tcp_full_duplex_client.c

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

* Fix Typos In Full Duplex TCP & Add Remote Command Execution Using UDP

* updating DIRECTORY.md

* Update settings.json

* Update client_server/remote_command_exec_udp_client.c

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

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-11 23:50:57 +05:30
Idan BananI
0ceb3b340e
Update dijkstra.c (#928)
in this way valgrind checks will pass and result will stay the same (functions as a static variable)
2022-01-11 23:50:32 +05:30
Liu Yihua
bd06a9f424
fix: typo in comments of leetcode-3 (#931)
Co-authored-by: David Leal <halfpacho@gmail.com>
2022-01-11 11:28:27 -06:00
KuhakuPixel
ef9878627d
fix: free the allocated resources in quick sort (#923) 2021-12-22 15:03:59 -06:00
straight-into-the-wall
37534f4d8c
feat: leetcode zigzag solution (#897)
* perf: faster implementation of the TwoSum problem

* doc: fixed typos on comments

* updating DIRECTORY.md

* feat: leetcode ZigZag conversion solution

* doc: leetcode README added ZigZag conversion solution

* fix: clang-tidy linter corrections

* doc: fixed typo on leetcode README

* Update leetcode/src/6.c

@file does not want parameters

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

* Update leetcode/src/6.c

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

* fix: unsigned int and include comments

* fix: comments on includes. Doxygen file. static test function

* fix: add missing headers

* Delete 1.c

* Revert "Merge branch 'master' into leetcode/zigzag"

This reverts commit b46a6afd52.

* fix: revert 1.c

* updating DIRECTORY.md

* Empty commit to test the CI

* Update leetcode/src/6.c

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

* Update leetcode/src/6.c

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

* fix: missing main

* updating DIRECTORY.md

* doc: added missing comment

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-12-09 11:51:02 -06:00
David Leal
1370c44aee
fix: Discord logo's color 2021-12-06 14:52:24 -06:00
Navid Salehi
934f55f179
fix: merge sort bug (#921)
Merge sort does not work properly. To reproduce the bug input 6, 5, 4, 3, 2, 1 the output would be 2, 3, 1, 4, 5, 6.

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-12-02 12:55:40 -06:00
Navid Salehi
c8eec2fb57
docs: remove redundant space before comma (#920)
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-12-01 11:43:09 -06:00
David Leal
be9daa2b60
Update .gitpod.yml 2021-11-21 14:16:01 -06:00
David Leal
2fba8889a0
feat: Add contact links in the issue template configuration 2021-11-11 17:54:41 -06:00
straight-into-the-wall
5cca0ebd48
fix: Hotfix/awesome zero files (#919)
* perf: faster implementation of the TwoSum problem

* doc: fixed typos on comments

* updating DIRECTORY.md

* fix: comments on includes. Doxygen file. static test function

* fix: revert 1.c

* updating DIRECTORY.md

* fix: 0 files are not in one and only one directory

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-09 17:16:14 -06:00