DesignAlgorithms
Homework Solutions for Design Algorithm Course as Computer Science B.Sc. Student at Department of Mathematical Sciences, Sharif University of Technology
Install / Use
/learn @ammahmoudi/DesignAlgorithmsREADME
DesignAlgorithms
Homework Solutions for Design Algorithm Course as Computer Science B.Sc. Student at Department of Mathematical Sciences, Sharif University of Technology.
Spring 2023
Supervisor: Dr. Shahram Khazaei
Description
This repository includes my homework and projects around Algorithms and Data structures.
Table of Coding Problems
Each problem has a PDF file describing the problem in Persian in the format of a story. Algorithms are supposed to be fast and efficient to accept the original problem restrictions.
| Problem | Description | | --- | --- | | BalancedParanthesisMinimumSwapsCounter | Finding minimum swaps needed to balance an input string of parentheses | | ClosestPointsFinder |Finding closest points on a 2d plane with different data structures in O(n log n) | | DiversityCoefficientFinding | Calculating Diversity Coefficient among a group of singers in a singing competition | | FarthestNodeFinder | Finding the farthest node from the given starting node using Dijkstra | | LongestCommonIncreasingSubsequence | Finding Longest Common Increasing Subsequence between two strings using Dynamic Programming | | MaximumVerticalMarginClassifier | a simple sudo SVM Classifier which only considers vertical distance (solved by LP) | | RookPlacingwithinAllowedArea | Placing Rooks in an N*N chess board in which each rook is allowed to place only in a specified area without threatening other rooks | | SafeMST | indicates that a list of edges are all part of the MST of the given graph using some sudo-kruskal algorithm | | SafePathFinder | indicates that there is a safe path between the start and end point in a graph which has some unsafe edges | | ShortestPathesToGraphBuilder | Given a list of shortest path lengths between vertices and trying to make the smallest graph with these properties | | TreeSplittingCounter | Given a tree, trying to count all combinations of splitting this tree with some restrictions |
Theoretical Problems
There is some theoretical homework along with my solutions around the algorithm topics. (my answers may be incorrect!) sourcebook of the course:
Algorithms
Book by Christos Papadimitriou, Sanjoy Dasgupta, and Umesh Vazirani
The problems are in Persian but my answers are in English.
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-designer
Use this agent when you need to design, implement, or improve user interface components and user experience flows. Examples include: creating new pages or components, improving existing UI layouts, implementing responsive designs, optimizing user interactions, building forms or dashboards, analyzing existing UI through browser snapshots, or when you need to ensure UI components follow design system standards and shadcn/ui best practices.\n\n<example>\nContext: User needs to create a new dashboard page for team management.\nuser: "I need to create a team management dashboard where users can view team members, invite new members, and manage roles"\nassistant: "I'll use the ui-ux-designer agent to design and implement this dashboard with proper UX considerations, using shadcn/ui components and our design system tokens."\n</example>\n\n<example>\nContext: User wants to improve the user experience of an existing form.\nuser: "The signup form feels clunky and users are dropping off. Can you improve it?"\nassistant: "Let me use the ui-ux-designer agent to analyze the current form UX and implement improvements using our design system and shadcn/ui components."\n</example>\n\n<example>\nContext: User wants to evaluate and improve existing UI.\nuser: "Can you take a look at our pricing page and see how we can make it more appealing and user-friendly?"\nassistant: "I'll use the ui-ux-designer agent to take a snapshot of the current pricing page, analyze the UX against Notion-inspired design principles, and implement improvements using our design tokens."\n</example>
