Skip to content

Implementations of data structures and algorithms in Python. Includes linked lists, stacks, queues, sorting, and searching with analysis of time complexity.

Notifications You must be signed in to change notification settings

shreya-adk/data-structures-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms in Python

This repository contains my implementations of data structures and algorithms developed as part of my DSA456 coursework at Seneca Polytechnic.
It demonstrates Python programming, problem-solving, time complexity analysis, and test-driven development.


📂 Repository Structure

  • assignments/

    • a1_partc.py, a1_partd.py – features including undo functionality
    • a2_parta.py, a2_partb.py – algorithm implementations
    • a2_partc.md, a2.md – written analysis and assignment notes
  • tests/

    • test_a2_parta.py, test_a2_partb.py – unit tests for algorithm validation
  • game/

    • game.py – interactive game logic
    • blue.png, green.png, grey.png, orange.png, pink.png, yellow.png – game assets
  • players/

    • player1.py, player2.py – player classes used in the game
  • requirements.txt – Python dependencies


🚀 Features

  • Implementations of core data structures and algorithms
  • Undo feature for state management
  • Unit tests with Python
  • Interactive Python game project
  • Time complexity analysis and written documentation

⚙️ How to Run

Clone the repo and run any Python file directly:

git clone https://github.com/shreya-adk/data-structures-algorithms.git
cd data-structures-algorithms
python3 assignments/a2_parta.py

🧪 Run Tests

Run the unit tests with pytest:

pytest tests/test_a2_parta.py
pytest tests/test_a2_partb.py

🎥 Demo & Reflection Videos

  • Demo Video
    A walkthrough video where I explain and showcase the undo feature and the gems animation in Assignment 2.
    ▶️ The link is included in assignments/a2_partc.md.

  • Reflection Video
    In this video, I reflect on the coding features I contributed, explain my design choices (stack for undo, list for animations), discuss challenges faced, and how I overcame them.
    ▶️ The link is included in assignments/a2.md.

🔑 Key Insights from Reflection

  • Undo Feature
    Implemented using a stack to store game states (LIFO). Efficient rollback of moves without losing game variables (like turn count).

  • Game State Management
    Designed a GameState class to capture all critical data, ensuring smooth and error-free undo functionality.

  • Gems Animation
    Built an Animation class with a list to manage active animations, allowing smooth updates for multiple simultaneous animations.

  • Challenges Solved
    Prevented game lag by updating animations in small increments per frame, balancing responsiveness with visual polish.

  • Learning Outcome
    Strengthened skills in selecting the right data structures, handling state management, and optimizing user experience in game development.

🤝 Contributors & Teamwork

This project was originally developed as part of a team assignment during my DSA456 course at Seneca Polytechnic.
The contributors listed in the GitHub history reflect my group members.

My Role

I contributed to multiple parts of the project, including:

  • Implemented the undo feature (a1_partc.py)
  • Designed and added the gems animation in Assignment 2
  • Worked on algorithm implementations and unit tests (a2_parta.py, test_a2_parta.py, test_a2_partb.py)
  • Assisted with written analysis and documentation (a2_partc.md)
  • Organized and restructured this repo for portfolio presentation

💡 Skills Highlighted

  • Programming Languages: Python (primary)
  • Data Structures & Algorithms: Stacks, Lists, State Management, Time Complexity Analysis
  • Software Development Practices: Test-Driven Development (Pytest), Version Control (Git/GitHub), Code Organization
  • Game Development Concepts: Animation handling, state rollback, responsive user experience
  • Collaboration: Worked in a team project environment, contributed distinct features, produced reflection and demo videos for clarity
  • Problem-Solving: Tackled challenges with performance, smooth user experience, and data management through efficient structures

About

Implementations of data structures and algorithms in Python. Includes linked lists, stacks, queues, sorting, and searching with analysis of time complexity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages