victorknox / friend-book Goto Github PK
View Code? Open in Web Editor NEWA simple friends recommendation system resembling that of facebook's
A simple friends recommendation system resembling that of facebook's
If a user unregisters, they should be removed from everyone's friend's lists(following):
create a "followers" list which is the anti graph of "following" graph
When a user unregisters, traverse through the "followers" list, go to each user's "following" list and delete the user who unregistered.
We are not currently updating the size of the user_list. We should do so by calling the resize_user_array function every time a new user registers. This cannot be done directly as resize_user_array depends on the variable largest_user_ID but we are not updating the value of largest_user_ID in the code currently.
It should create a struct and take in all the parameters of the user and assign them a USER ID (using the algo below)
It should have
A dynamic array/vector storing positive integers 1 to n
printf("Enter your country: ");
newUser->country = (char *)malloc(sizeof(char *));
scanf(" %[^\n]%*c", newUser->country);
This doesn't look right. Need to review.
Followers list struct
Following list struct
minumum required functions:
empty( ) – Returns whether the queue is empty. (bool)
front( ) function returns a reference to the first element of the queue. back() function returns a reference to the last element of the queue.
push( g) and pop( ) – push() function adds the element ‘g’ at the end of the queue. pop() function deletes the first element of the queue.
We directly free the user struct when unregistering but the strings like name, organisation, etc are dynamically allocated and must be freed before freeing the struct itself to avoid memory leaks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.