While it’s fun writing your own code when it comes to things like sort or graph algorithms, common algorithms, you can save a lot of time, grief, debugging by using code that someone else has created.
Today I came across an algorithms website with algorithm source code for 14 programming languages including C, C++, Java, Python and go.
The C site alone has over 150 algorithms, mind you the Python and C++ have over 600!. Each of the ones I’ve looked at links to a YouTube video (not always about a C implementation but about the topic) and has a source code listing.
Overall its a very useful resource, has a memorable url (algorithm examples) and I’;ve added a permanent link on the C Code utilities page.