Navigation Menu
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications You must be signed in to change notification settings
This repository is a compilation of my solutions to the Data Structures and Algorithms assignments offered by the University of California, San Diego (UCSD) and the National Research University Higher School of Economics (HSE) on Coursera. These assignments, covering material from courses 1 through 6, have all been solved using the Python.
TZhoroev/Coursera-Data_Structures_and_Algorithms
Folders and files, repository files navigation, coursera-data_structures_and_algorithms.
This repository contains my solutions to the Data Structures and Algorithms assignments offered by the University of California, San Diego (UCSD) and the National Research University Higher School of Economics (HSE) on Coursera. All of the problems from courses 1 through 6 have been solved using Python.
These solutions are intended to serve as a reference for those working on these assignments or seeking an alternative perspective on how to approach the problems. It is recommended that you try solving the assignments independently before consulting these solutions, as the best way to improve your skills is through practice. However, if you encounter difficulties or require additional guidance, these solutions are available for reference.
I hope that this repository proves to be a useful resource for your studies in data structures and algorithms.
Algorithmic Toolbox : Certificate
This online course covers basic algorithmic techniques and ideas for computational problems arising frequently in practical applications: sorting and searching, divide and conquer, greedy algorithms, dynamic programming.
Week 1: Welcome
- Sum of Two Digits .
- Maximum Pairwise Product .
Week 2: Algorithmic Warm-up
- Fibonacci Number
- Last Digit of a Large Fibonacci Number
- Greatest Common Divisor
- Least Common Multiple
- Fibonacci Number Again
- Last Digit of the Sum of Fibonacci Numbers Again
Week 3: Greedy Algorithms
- Money Change
- Maximum Value of the Loot
- Car Fueling
- Maximum Advertisement Revenue
- Collecting Signatures
- Maximum Number of Prizes
- Maximum Salary
Week 4: Divide and Conquer
- Binary Search
- Binary Search with Duplicates
- Majority Element
- Improving Quick Sort
- Number of Inversions
- Organizing a Lottery
- Closest Points
Week 5: Dynamic Programming I
- Money Change Again
- Primitive Calculator
- Edit Distance
- Longest Common Subsequence of Two Sequences
- Longest Common Subsequence of Three Sequences
Week 6: Dynamic Programming II
- Maximum Amount of Gold
- Partitioning Souvenirs
- Maximum Value of an Arithmetic Expression
Data Structures : Certificate
In this online course, we consider the common data structures that are used in various computational problems.
Week 1: Basic Data Structures
- Check brackets in the code
- Compute tree height
- Network packet processing simulation
- Extending stack interface
- Maximum in Sliding Window
Week 2: Priority Queues and Disjoint Sets
- Convert array into heap
- Parallel processing
- Merging tables
Week 3: Hash Tables and Hash Functions
- Hashing with chains
- Find pattern in text
- Substring equality
- Longest common substring
- Pattern matching with mismatches
Week 4: Binary Search Trees
- Binary tree traversals
- Is it a binary search tree?
- Is it a binary search tree? Hard version
- Set with range sums
Algorithms on Graphs : Certificate
In this online course, first learned what a graph is and what are some of the most important properties. Then we learned several ways to traverse graphs and how one can do useful things while traversing the graph in some order. Then we learned shortest paths algorithms — from the basic ones to those which open door for 1000000 times faster algorithms used in Google Maps and other navigational services. We finished with minimum spanning trees which are used to plan road, telephone and computer networks and also find applications in clustering and approximate algorithms.
Week 1: Decomposition of Graphs I
- Finding an Exit from a Maze
- Adding Exits to a Maze
Week 2: Decomposition of Graphs II
- Checking Consistency of CS Curriculum
- Determining an Order of Courses
- Checking Whether Any Intersection in a City is Reachable from Any Other
Week 3: Paths in Graphs I
- Computing the Minimum Number of Flight Segments
- Checking whether a Graph is Bipartite
Week 4: Paths in Graphs II
- Computing the Minimum Cost of a Flight
- Detecting Anomalies in Currency Exchange Rates
- Exchanging Money Optimally
Week 5: Minimum Spanning Trees
- Building Roads to Connect Cities
Week 6: Advanced Shortest Paths
- Friend Suggestion
- Compute Distance Faster Using Coordinates
- Compute Distance with Preprocessing
- Compute Distance with Preprocessing on Larger Road Networks
- Travelling Salesman Problem
Algorithms on Strings : Certificate
Textual information abounds in the world and on the internet. We read webpages, books, emails, and textual inquiries to conduct information searches. From the perspective of computer science, each of those are strings. Search engines employ a variety of string algorithms to make sense of all that data and improve the effectiveness of searches. In addition, a variety of search methods are used in the developing field of personalized medicine to identify mutations in the human genome that cause disease. You will master important pattern matching ideas in this online course, including attempts, suffix trees, suffix arrays, and even the Burrows-Wheeler transform.
Week 1: Suffix Trees
- Construct a Trie from a Collection of Patterns
- Implement TrieMatching
- Extend TrieMatching
- Construct the Suffix Tree of a String
- Find the Shortest Non-Shared Substring of Two Strings
Week 2: Burrows–Wheeler Transform and Suffix Arrays
- Construct the Burrows–Wheeler Transform of a String
- Reconstruct a String from its Burrows–Wheeler Transform
- Implement BetterBWMatching
- Construct the Suffix Array of a String
Week 3 & 4: Algorithmic Challenges: Suffix Arrays
- Find All Occurrences of a Pattern in a String
- Construct the Suffix Array of a Long String
- Pattern Matching with the Suffix Array
- Construct the Suffix Tree from the Suffix Array
Advanced Algorithms and Complexity : Certificate
Week 1: flows in networks.
- Evacuating People
- Assigning Airline Crews to Flights
- Stock Charts
Week 2: Linear Programming
- Infer Energy Values of Ingredients
- Optimal Diet Problem
- Online Advertisement Allocation
Week 3: NP-completeness
- Assign Frequencies to the Cells of a GSM Network
- Cleaning the Apartment
- Advertisement Budget Allocation
Week 4: Coping with NP-completeness
- Integrated Circuit Design
- Plan a Fun Party
- Reschedule the Exams
Week 5: Streaming Algorithms
- Nice vs Naughty
Genome Assembly Programming Challenge : Certificate
Week 1: Assembling phi X174 Using Overlap Graphs
- Assembling the phi X174 Genome from Error-Free Reads Using Overlap Graphs
- Assembling the phi X174 Genome from Error-Prone Reads Using Overlap Graphs
Week 2: Assembling Genomes Using de Bruijn Graphs
- Puzzle Assembly
- Finding an Eulerian Cycle in Directed Graph
- Finding a k-Universal Circular String
- Assembling the phi X174 Genome from its k-mer Composition
Week 3: Genome Assembly Faces Real Sequencing Data
- Finding a Circulation in a Network
- Selecting the Optimal k-mer Size
- Bubble Detection
- Tip Removal
- Assembling the phi X174 Genome from Error-Prone Reads using de Bruijn Graphs
- Python 61.9%
Browse Course Material
Course info.
- Prof. Erik Demaine
Departments
- Electrical Engineering and Computer Science
As Taught In
- Algorithms and Data Structures
Learning Resource Types
Advanced data structures, assignments.
- There will be a weekly one-page assignment, 10 assignments in total.
- You may skip any one problem, or we will ignore the problem with the lowest grade. If you volunteered to scribe twice, we will ignore the lowest two grades.
- The answers must be typeset in LaTeX. The answers must fit in one page, or your solution will not be read. Use at least 10 pt font and 1 inch margins. This rule is meant to prepare you for writing research publications: one often has to explain great ideas in a very limited number of pages.
- Submissions must be made online and consist of a compiled PDF document.
- Grades and comments will be posted online.
- Solutions do not need to include all calculations, trivial details etc. Just prove to us that you found the solution, and you understand it well.
- 0 = You didn’t get it. Filling one page to the brim does not mean you can’t get zero. Please don’t write stuff you know is wrong.
- 1 = Your solution was ultimately a good one, but the write-up contained significant errors or omissions.
- 2 = (We think) you got it.
IMAGES
VIDEO