Aryadev Chavali
dc090ace5f
(*)~changed up makefile recipes, cleaned up README
2023-06-25 07:38:39 +01:00
Aryadev Chavali
b58ee52a81
(General)~forgot to format my files
...
Need to remember to format before each commit
2021-11-26 02:35:23 +00:00
Aryadev Chavali
c0ccb7b384
(list)+some flavour text for list program output
2021-11-22 06:09:34 +00:00
Aryadev Chavali
ab5d1c6997
(list)+filter function
...
This generates a new list, and appends to it every time the current
list value satisfies the condition. It then recursively calls the
filter on the next value.
2021-11-22 06:08:52 +00:00
Aryadev Chavali
1d91eb52b6
(list)+reduce function
...
Basically accumulates values, check
https://en.wikipedia.org/wiki/Fold_(higher-order_function) for more
detail.
2021-11-22 06:00:05 +00:00
Aryadev Chavali
8f0ee1694b
(list)+example for map in main
2021-11-22 05:59:48 +00:00
Aryadev Chavali
f4b08ddada
(list)+map function
...
void return, just maps f onto every value in the linked list till
nullity.
2021-11-22 05:53:07 +00:00
Aryadev Chavali
1537bb705b
(list)~NULL -> nullptr
...
C++ styling.
2021-11-22 05:52:49 +00:00
Aryadev Chavali
36d5eb111a
(list)+recursive reverse algorithm for singly linked lists
...
Pretty simple, returns the last node as that's the new root node.
Uses default parameters to make sure the first node has next set to null.
2021-11-21 00:28:23 +00:00
Aryadev Chavali
2f0fe5aef2
(list)+general style change, use unary switches for checking null
2021-11-21 00:28:01 +00:00
Aryadev Chavali
e30444cdde
(list)+destructor function in struct
...
Nice feature of C++, destructors make it kinda nice to do memory
management. Though they don't fully reduce the pain lol
2021-11-20 22:57:27 +00:00
Aryadev Chavali
cae91a793c
(list)+first test with appends and output
...
Main now uses append and cout mechanisms for a simple program!
2021-11-20 22:51:25 +00:00
Aryadev Chavali
fc6fc4032b
(list)+simple output mechanism via C++ streams
...
cout has inbuilt support for multiple types, easier than using
printf. Just have to ease the compiler into it
2021-11-20 22:50:05 +00:00
Aryadev Chavali
fccfcd4a9f
(list)~struct List is not necessary
...
Slight whiplash from change to C++, can just use typename now.
2021-11-20 22:40:56 +00:00
Aryadev Chavali
a495bd9c64
(list)+list.cpp file
...
Will have all the singly linked list algorithms I can think of, using
the structure I have defined (template based singly linked list) and
the simple append function I have added that also acts as the main
method of creating an instance.
2021-11-20 22:35:32 +00:00