<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS301 GDB 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/1439/cs301-gdb-1-solution-and-discussion">CS301 GDB 1 Solution and Discussion</a></p>
<p dir="auto">Total Marks	5<br />
Starting Date	Monday, February 08, 2021<br />
Closing Date	Tuesday, February 09, 2021<br />
Status	Open<br />
Question Title	Graded Discussion Board<br />
Question Description	<br />
GDB Scenario:</p>
<p dir="auto">Your friend is developing a maze puzzle game and already designed a module which can generate a random maze. The maze has one entry and one exit point. Now he needs to develop the module which will find the path from entry to exit points for randomly generated maze. Your friend wants the path searching should be quickest. He can use only Stack or Queue data structures to store maze’s visited locations for path generation. He is unable to decide the selection of data structure and asked you to help him.</p>
<p dir="auto">GDB Question:</p>
<p dir="auto">From Stack and Queue data structures which data structure you will suggest using for entry to exit path finding module? Select a data structure and give comments in favour to justify your selection. Also mention why you are not selecting the other data structure?</p>
<p dir="auto">Instructions:</p>
<p dir="auto">A concise, coherent and to the point answer is preferred over lengthy comment having irrelevant details.  Answers, posted on regular Lesson’s MDB or sent through email will NOT be considered in any case.</p>
<p dir="auto">Best of Luck!</p>
]]></description><link>https://community.secnto.com//topic/2175/cs301-gdb-1-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 21:47:57 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/2175.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Feb 2021 06:35:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS301 GDB 1 Solution and Discussion on Tue, 09 Feb 2021 06:37:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaasmi" aria-label="Profile: zaasmi">@<bdi>zaasmi</bdi></a> said in <a href="/post/6443">CS301 GDB 1 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">From Stack and Queue data structures which data structure you will suggest using for entry to exit path finding module? Select a data structure and give comments in favour to justify your selection. Also mention why you are not selecting the other data structure?</p>
</blockquote>
<p dir="auto">I Would suggest Stack data structure over Queue. This is because in solving a maze problem, we need to explore all possible paths. Along with that, we also need to track the paths visited.<br />
If we were to use Queue, then after finding an unsuccessful path, we’ll have to start again from the entry point as queue only supports deletion from the front (FIFO property). This would not be useful in our case, as we need to trace back the unsuccessful path until we find another way.<br />
Using Stack, what we can do is, while moving into the maze, we can push the index of the last visited cell and when reached the end of the maze(not exit-point), just keep popping elements from the stack until the cell at stack Top has another way to move.<br />
Using this approach (particularly stack), you can find the correct path in the shortest possible time.</p>
]]></description><link>https://community.secnto.com//post/6444</link><guid isPermaLink="true">https://community.secnto.com//post/6444</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Tue, 09 Feb 2021 06:37:08 GMT</pubDate></item></channel></rss>