Navigation

    Cyberian
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Pro Blog
    • Users
    • Groups
    • Unsolved
    • Solved

    SOLVED CS301 GDB 1 Solution and Discussion

    CS301 – Data Structures
    cs301 gdb 1 solution discussion fall 2020 gdb
    1
    2
    392
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zaasmi
      zaasmi Cyberian's Gold last edited by

      Re: CS301 GDB 1 Solution and Discussion

      Total Marks 5
      Starting Date Monday, February 08, 2021
      Closing Date Tuesday, February 09, 2021
      Status Open
      Question Title Graded Discussion Board
      Question Description
      GDB Scenario:

      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.

      GDB Question:

      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?

      Instructions:

      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.

      Best of Luck!

      Discussion is right way to get Solution of the every assignment, Quiz and GDB.
      We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
      Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
      NOTE: Don't copy or replicating idea solutions.
      Quiz Copy Solution
      Mid and Final Past Papers
      Live Chat

      1 Reply Last reply Reply Quote 0
      • zaasmi
        zaasmi Cyberian's Gold last edited by

        @zaasmi said in CS301 GDB 1 Solution and Discussion:

        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?

        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.
        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.
        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.
        Using this approach (particularly stack), you can find the correct path in the shortest possible time.

        Discussion is right way to get Solution of the every assignment, Quiz and GDB.
        We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
        Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
        NOTE: Don't copy or replicating idea solutions.
        Quiz Copy Solution
        Mid and Final Past Papers
        Live Chat

        1 Reply Last reply Reply Quote 0
        • zaasmi
          zaasmi Cyberian's Gold last edited by

          @zaasmi said in CS301 GDB 1 Solution and Discussion:

          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?

          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.
          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.
          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.
          Using this approach (particularly stack), you can find the correct path in the shortest possible time.

          Discussion is right way to get Solution of the every assignment, Quiz and GDB.
          We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
          Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
          NOTE: Don't copy or replicating idea solutions.
          Quiz Copy Solution
          Mid and Final Past Papers
          Live Chat

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Insaf Sehat Card Live Cricket Streaming

          100% Off on Your FEE Join US! Ask Me How?

          Quiz 100% Result If you want to know how you can join us and get 100% Discount on your FEE ask Cyberian in Chat Room!
          Quiz 100% Result Quiz 100% Result
          solution1255 discussion1206 fall 2019813 assignment 1433 assignment 2297 spring 2020265 gdb 1248 assignment 382 crw10174 spring 201955
          | |
          Copyright © 2021 Cyberian Inc. Pakistan | Contributors
          Live Chat