# Breadth First Search algorithm in C

**URL:** <https://forum.kirupa.com/t/breadth-first-search-algorithm-in-c/299144>\
**Category:** programming\
**Created:** [October 30, 2009, 2:47pm UTC](https://forum.kirupa.com/t/breadth-first-search-algorithm-in-c/299144 "2009-10-30T14:47:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mossy464](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mossy464](https://forum.kirupa.com/u/mossy464)\
**Post date:** [October 30, 2009, 2:47pm UTC](https://forum.kirupa.com/t/breadth-first-search-algorithm-in-c/299144/1 "2009-10-30T14:47:22Z")

</div>

Hi,

Im looking for a bit of guidance on this. I have a project for college for network design. It is to implement a C program for the breadth first search algorithm.

I can program in c but this is really confusing me, iv seen examples but they are hard to follow. Please see the brief below. Just need a push in the right direction to get started not the whole thing thanks.

BRIEF:

**Implement Moores + Breadth First Search algorithm**

-[FONT=&quot] [/FONT]Input a list of edges in the format

{A, B}

-[FONT=&quot] [/FONT]Where A, B are integers.  
-[FONT=&quot] [/FONT]The application should return

[LIST]  
[_]Shortest path between a pair of user selected nodes.  
[_]A spanning tree for the network.  
[/LIST]

Estimate the performance of the algorithm as a function of no of edges in the input list.

[FONT=&quot](I.e. time no of top level operations, memory usage etc)[/FONT]
