The Wayback Machine - https://web.archive.org/web/20200916131255/https://github.com/TheAlgorithms/C/pull/485
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search element #485

Open
wants to merge 5 commits into
base: master
from
Open

search element #485

wants to merge 5 commits into from

Conversation

@Shreya2704
Copy link

Shreya2704 commented Oct 28, 2019

Added a new file to search an element in a singly liked list.

Shreya2704 added 5 commits Oct 28, 2019
@Shreya2704
Copy link
Author

Shreya2704 commented Oct 28, 2019

Fixes issue #487

@ashwek
Copy link
Member

ashwek commented Nov 5, 2019

@Shreya2704 thank you for contributing, but we already have an implementation of linked list, & it would be great if you could add functionalities / improve the already existing program instead of adding a completely new program. So please remove the search_element.cpp file from the PR.

};

// A data structure to represent a node of graph
GRAPH_T* createGraph();

This comment has been minimized.

@ashwek

ashwek Nov 5, 2019

Member

struct tag is missing before GRAPH_T


GRAPH_T* createGraph()
{
struct GRAPH_T* graph = (struct GRAPH_T*) malloc(sizeof(GRAPH_T));

This comment has been minimized.

@ashwek

ashwek Nov 5, 2019

Member

struct tag is missing before GRAPH_T

{
struct GRAPH_T* graph = (struct GRAPH_T*) malloc(sizeof(GRAPH_T));

graph->pNodeArray = (struct NODE_T*) malloc(MAXCITY* sizeof(NODE_T));

This comment has been minimized.

@ashwek

ashwek Nov 5, 2019

Member

struct tag is missing before NODE_T

{
strcpy_s(graph->pNodeArray[i].city,city_array[i]);
graph->pNodeArray[i].thisNodeID = i;
graph->pNodeArray[i].pEdgelist = (struct EDGE_T*) malloc(numberOfEdgeArray[i]* sizeof(EDGE_T));

This comment has been minimized.

@ashwek

ashwek Nov 5, 2019

Member

struct tag is missing before EDGE_T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.