Generic implementations of algorithms and data structures in C++.
15/100 healthLoading repository data…
Loading repository data…
MostafaTwfiq / repository
Generic data structures and algorithms implemented in c language.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
General overview:
Selected from shared topics, language and repository description—not editorial ratings.
Generic implementations of algorithms and data structures in C++.
15/100 healthjessicadev-eng /
C# implementation of core data structures and algorithms, including hashing, sorting and searching, generic linked lists, and a binary search tree, with unit testing using NUnit.
34/100 healthPriority queue implemnted using binary heap
| Function | Complexity | Comments |
|---|---|---|
| reverse array | O (n) | |
| get most frequent value A | O (n ^ 2) | this function will use a resizable array to store the repeated values |
| get most frequent value H | O (n) | this function will use a hash map to store the repeated values |
| print array | O (n) | this function will need a helper printing function |
| resize array | O (n) | |
| array resize and copy | O (n) | this function will allocate a new array with the new length and then it will copy the values in the original array into the new one |
| array resize and copy of range | O (k) and k is the length of the copying range | this function will allocate a new array with the new length and then it will copy the values between the provided into the new array |
| array copy | O (n) | this function will allocate a new array then it will copy the values in the original array into the new one |
| array copy of range | O (k) and k is the length of the copying range | this function will allocate a new array then it will copy the values between the provided range into the new array |
| fill array | O (n) | |
| fill array in range | O (k) and k is the length of the range | |
| compare arrays | O (n) | |
| compare arrays in range | O (k) and k is the length of the range | |
| array mismatch | O (n) | |
| array mismatch in range | O (k) and k is the length of the range | |
| array anagrams S | O (n log(n)) | this function will sort the array first to determine if they are equals |
| array anagrams H | O (n) | this function will use a hash map the compare the arrays |
| array remove duplicates A | O (n ^ 3) | this function will use a resizable array to detect the duplicates |
| array remove duplicates H | O (n ^ 2) | this function will use a hash map to detect the duplicates |
| array count values | O (n) | |
| is sub array | O (n ^ 2) | |
| array get index | O (n) | |
| array contains | O (n) | |
| array remove at index | O (n) | |
| array sort | O (n log(n)) | this function will use quick sort algorithm to sort the array, note that quick sort complexity can be O (n ^ 2) |
| array get first | O (n) | |
| array get last | O (n) | |
| array get all | O (n) | |
| array binary search | O (log(n)) | |
| array is palindrome | O (n) | |
| array is rotation of an array | O (n) | |
| array update element | O (1) | |
| array add | O (n) | |
| array add all | O (n) | |
| array swap two indices | O (1) |
| Function | Complexity | Comments |
|---|---|---|
| is sub string | O (n ^ 2) | |
| reverse words | O (n) | |
| custom trim start | O (n ^ 2) | |
| trim start | O (n ^ 2) | |
| custom trim end | O (n) | |
| trim end | O (n) | |
| custom trim | O (n ^ 2) | |
| trim | O (n ^ 2) | |
| contains | O (n) | |
| remove character | O (n) | |
| is integer | O (n) | |
| is floating point | O (n) | |
| sum characters ASCII | O (n) | |
| hash char array | O (n) | this function actually will return the sum the the characters ASCII |
| generate char array | O (n) | this function will allocate a new char array then it will copy the original char array into the new one |
| generate char pointer | O (1) | this function will generate a char pointer to a character |
| is alphabet C | O (1) | this function will take a character value then it will check if it's an alphabet character |
| is alphabet | O (1) | this function will take a character pointer then it will check if it's an alphabet character |
| comparison function P | O (1) | this function will take two character pointers then it will compare there ASCII values |
| comparison function | O (1) | this function will take two character value then it will compare there ASCII values |
| split S | O (n) | this function will split the char array into s |