{"id":76199,"date":"2024-07-28T16:44:27","date_gmt":"2024-07-28T20:44:27","guid":{"rendered":"https:\/\/bangla.sitestree.com\/?p=76199"},"modified":"2024-07-28T17:02:53","modified_gmt":"2024-07-28T21:02:53","slug":"steps-to-search-in-a-hash-table-built-using-graph-chaining","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76199","title":{"rendered":"Steps to Search in a Hash Table Built Using Graph: Chaining"},"content":{"rendered":"\n<p>\u2022Search the Hash<\/p>\n\n\n\n<p>\u2022Read a number\/word<\/p>\n\n\n\n<p>\u2022From the user<\/p>\n\n\n\n<p>\u2022Find the position for this number\/word<\/p>\n\n\n\n<p>\u2022in the graph (vertical array of nodes)<\/p>\n\n\n\n<p>\u2022By dividing with N or similar<\/p>\n\n\n\n<p>\u2022Check if any vertex node is there<\/p>\n\n\n\n<p>\u2022In that array position (array of graph vertices)<\/p>\n\n\n\n<p>\u2022If no vertex is there<\/p>\n\n\n\n<p>\u2022The word is not in the hash<\/p>\n\n\n\n<p>\u2022If a vertex is there<\/p>\n\n\n\n<p>\u2022Match with the vertex label, if matched you found the word\/number<\/p>\n\n\n\n<p>\u2022If&nbsp; no match with the vertex labels<\/p>\n\n\n\n<p>\u2022traverse through the edges<\/p>\n\n\n\n<p>\u2022Until you find a match<\/p>\n\n\n\n<p><strong>\u2022How to Build<\/strong><\/p>\n\n\n\n<p>\u2022Build the Hash<\/p>\n\n\n\n<p>\u2022Read a number\/word from file<\/p>\n\n\n\n<p>\u2022Find the position for this number\/word<\/p>\n\n\n\n<p>\u2022in the graph (vertical array of nodes)<\/p>\n\n\n\n<p>\u2022By dividing with N or similar<\/p>\n\n\n\n<p>\u2022Check if any vertex node is there<\/p>\n\n\n\n<p>\u2022In that array position (array of graph vertices)<\/p>\n\n\n\n<p>\u2022If no vertex is there<\/p>\n\n\n\n<p>\u2022Create a vertex node, assign the number\/word to that node<\/p>\n\n\n\n<p>\u2022Insert into that position<\/p>\n\n\n\n<p>\u2022If a vertex is there<\/p>\n\n\n\n<p>\u2022If no edge so far, create an edge node, assign number\/word<\/p>\n\n\n\n<p>\u2022Else: traverse through the edges<\/p>\n\n\n\n<p>\u2022Go to the end of the edge list<\/p>\n\n\n\n<p>\u2022Create an edge vertex, assign the number\/word to that edge node<\/p>\n\n\n\n<p>\u2022<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2022Search the Hash \u2022Read a number\/word \u2022From the user \u2022Find the position for this number\/word \u2022in the graph (vertical array of nodes) \u2022By dividing with N or similar \u2022Check if any vertex node is there \u2022In that array position (array of graph vertices) \u2022If no vertex is there \u2022The word is not in the hash &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=76199\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1966,1883,182],"tags":[],"class_list":["post-76199","post","type-post","status-publish","format-standard","hentry","category-data-structure-and-algorithms","category---data-structure","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":76197,"url":"http:\/\/bangla.sitestree.com\/?p=76197","url_meta":{"origin":76199,"position":0},"title":"Steps to Build a Hash Table: Using Graph: Chaining","author":"Sayed","date":"July 28, 2024","format":false,"excerpt":"\u2022Build the Hash \u2022Read a number\/word from file \u2022Find the position for this number\/word \u2022in the graph (vertical array of nodes) \u2022By dividing with N or similar \u2022Check if any vertex node is there \u2022In that array position (array of graph vertices) \u2022If no vertex is there \u2022Create a vertex\u2026","rel":"","context":"In &quot;Data Structure and Algorithms&quot;","block_context":{"text":"Data Structure and Algorithms","link":"http:\/\/bangla.sitestree.com\/?cat=1966"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76175,"url":"http:\/\/bangla.sitestree.com\/?p=76175","url_meta":{"origin":76199,"position":1},"title":"Build an Adjacency List Graph from Node Labels in a File","author":"Sayed","date":"July 20, 2024","format":false,"excerpt":"\/\/build the graph void buildGraph(FILE* in, Graph G) { int j, k, numEdges, weight; char name[MaxWordSize], nodeID[MaxWordSize], adjID[MaxWordSize]; \/\/ read the names of the vertices \/\/ and store them in the graph array for (j = 1; j <= G->numV; j++) { fscanf(in, \"%s\", name); G->vertex[j] = newGVertex(name); strcpy(G->vertex[j].id, name);\u2026","rel":"","context":"In &quot;Data Structure and Algorithms&quot;","block_context":{"text":"Data Structure and Algorithms","link":"http:\/\/bangla.sitestree.com\/?cat=1966"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76177,"url":"http:\/\/bangla.sitestree.com\/?p=76177","url_meta":{"origin":76199,"position":2},"title":"Print an Adjacency List Graph","author":"Sayed","date":"July 20, 2024","format":false,"excerpt":"\/\/ print the graph void printGraph(Graph G) { for (int j = 1; j <= G->numV; j++) { printf(\"%s: \", G->vertex[j].id); GEdgePtr p = G->vertex[j].firstEdge; while (p != NULL) { printf(\"%s %d \", G->vertex[p->child].id, p->weight); p = p->nextEdge; } printf(\"\\n\"); } }","rel":"","context":"In &quot;Data Structure and Algorithms&quot;","block_context":{"text":"Data Structure and Algorithms","link":"http:\/\/bangla.sitestree.com\/?cat=1966"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22881,"url":"http:\/\/bangla.sitestree.com\/?p=22881","url_meta":{"origin":76199,"position":3},"title":"Graph Mining: Node Importance","author":"Sayed","date":"March 21, 2021","format":false,"excerpt":"Resources to Learn From A Book. Nagiza F. Samatova, William Hendrix, John Jenkins, Kanchana Padmanabhan, and Arpan Chakraborty. 2013. Practical Graph Mining with R. Chapman & Hall\/CRC. Read the resources above to find answers. Betweenness Based Clustering: Learn by finding answers to the following questions. Can you answer the following?\u2026","rel":"","context":"In &quot;Graph Mining&quot;","block_context":{"text":"Graph Mining","link":"http:\/\/bangla.sitestree.com\/?cat=1905"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16305,"url":"http:\/\/bangla.sitestree.com\/?p=16305","url_meta":{"origin":76199,"position":4},"title":"Graph Mining: Betweenness Based Clustering: Learn by finding answers to the following questions. Can you answer the following?","author":"Sayed","date":"October 8, 2019","format":false,"excerpt":"Graph Mining: Betweenness Based Clustering: Learn by finding answers to the following questions. Can you answer the following? What are the types of Betweenness? What is Vertex Betweenness? i.e. the concept What is Edge Betweenness? i.e. the concept Describe Vertex Betweenness? maybe just giving an example What does Vertex Betweenness\u2026","rel":"","context":"In &quot;Graph Mining&quot;","block_context":{"text":"Graph Mining","link":"http:\/\/bangla.sitestree.com\/?cat=1905"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16312,"url":"http:\/\/bangla.sitestree.com\/?p=16312","url_meta":{"origin":76199,"position":5},"title":"Graph Mining: Introducing Graphs: Learn by finding answers to the following questions?","author":"Sayed","date":"October 10, 2019","format":false,"excerpt":"Graph Mining: Introducing Graphs: Learn by finding answers to the following questions? Questions What is a Graph? Give an example of a Graph? What are the different Types of Graphs? i.e. Try to give some examples of different ways how Graphs are classified? What is a directed Graph? What is\u2026","rel":"","context":"In &quot;AI ML DS RL DL NN NLP Data Mining Optimization&quot;","block_context":{"text":"AI ML DS RL DL NN NLP Data Mining Optimization","link":"http:\/\/bangla.sitestree.com\/?cat=1910"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76199"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76199\/revisions"}],"predecessor-version":[{"id":76200,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76199\/revisions\/76200"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}