Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upsearch element #485
Open
search element #485
Conversation
|
Fixes issue #487 |
|
@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.
This comment has been minimized.
|
|
||
| GRAPH_T* createGraph() | ||
| { | ||
| struct GRAPH_T* graph = (struct GRAPH_T*) malloc(sizeof(GRAPH_T)); |
This comment has been minimized.
This comment has been minimized.
| { | ||
| 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.
This comment has been minimized.
| { | ||
| 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.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


Shreya2704 commentedOct 28, 2019
Added a new file to search an element in a singly liked list.