-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lang: c, chapters: searching, sorting): Some serious errors (#1531)
* fix: correct hash table insertion * Use a pointer to a pointer instead of a single pointer in the insert function, ensuring proper updates to the hash table * Bug fixes: This fixes issues with empty results. * fix: correct issues in radix sort * Replaced loop-based array copy with memcpy to ensure efficient memory copying in countingSortDigit * Fixed a bug in radixSort where the maximum value search loop skipped the last element * Bug fix: Ensures all elements are checked when determining the maximum value in the array * perf: improve memory management by adding explicit memory release * revert: Revert to using the old loop override array method and drop specific api's like memcpy.
- Loading branch information
Showing
3 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters