/udacity-dsand-project2

Udacity DSAND Project 2: Show Me the Data Structures

Primary LanguagePythonMIT LicenseMIT

Show Me the Data Structures

This repo is for Project 2 of Udacity Data Structures and Algorithms nanodegree program.

This project has 6 problems to be solved.

File Structure

For each problem, the file structure is as follows:

  • problem_n.py - code for the problem
  • tests_n.py - unit tests for the problem
  • explanation_n.md - design explanation, code walkthrough, and time and space complexities for the solution
  • given_n.md - the problem's given instructions and boilerplate code

where _n is the problem's number such as problem_1.py.

Submission Instructions

Required:

  • Answer all 6 problems listed in the previous concepts.
  • Code solutions must be in a separate file like "problem_1.py". You can submit your answers by uploading a single .zip file or connecting to your GitHub repo.
  • For each question, create a solution in Python (version 3). All solutions should be functions named as laid out in the concepts. Feel free to make additional helper functions or classes as needed.
  • In the respective "problem_1.py" files, include at least 3 test cases for each solution.
    • For each test case, write the function call with the input you want to test and print it to the console".
    • On the next line, comment out the output you expect to see from that function call. At least 2 of these must be edge cases, testing inputs such as null values, empty inputs, unusually large values, etc.
  • Write up an explanation for each question in a single separate text file, PDF or markdown called "explanation_1.md".
    • Your paragraph should not be a detailed walkthrough of the code you provided, but provide your reasoning behind decisions made in the code. For example, why did you use that data structure? You also need to explain the efficiency (time and space) of your solution.

Note: Time complexity for reading the input will not be considered in the overall complexity of the solution.

Resources Used