

Урок без названия
Presentation
•
Other
•
KG
•
Practice Problem
•
Hard
Khumoyun Aminaddinov
FREE Resource
12 Slides • 0 Questions
1
Tutorial – 2
Solving problems on O, o, Ω, Θ notations
Programming simple graph types
Mr. Khumoyun Aminaddinov
2
Computing Fibonacci
numbers
● What is Big-O ?
● What is small o ?
● What is omega ?
● What is theta ?
O(n)
3
Let’s recap:
● Asymptotics
https://www.geeksforgeeks.org/diff
erence-between-big-oh-big-omega-
and-big-theta/
4
5
Let’s recap:
● Asymptotics
● Comparison
6
Let’s recap:
● What is graph ?
● Why we need them ?
7
Task 1
Depth First Search or DFS for a Graph.
Depth First Traversal (or DFS) for a graph is similar to
Depth First Traversal of a tree. The only catch here is,
that, unlike trees, graphs may contain cycles (a node
may be visited twice). To avoid processing a node more
than once, use a boolean visited array. A graph can have
more than one DFS traversal.
8
Task 2
Shortest path in a Binary Maze
Given an MxN matrix where each element can either be
0 or 1. We need to find the shortest path between a
given source cell to a destination cell. The path can only
be created out of a cell if its value is 1.
9
Task 3
Print all paths from a given source to a
destination
Given a directed graph, a source vertex ‘s’ and a
destination vertex ‘d’, print all paths from given ‘s’ to ‘d’.
Consider the following directed graph. Let the s be 2
and d be 3. There are 3 different paths from 2 to 3.
10
Task 4
Find the number of islands
using DFS
Given a binary 2D matrix, find the number of islands. A
group of connected 1s forms an island. For example,
the below matrix contains 4 islands.
11
Task 5
How to find Shortest Paths from
Source to all Vertices using
Dijkstra’s Algorithm
Given a graph and a source vertex in the graph, find the
shortest paths from the source to all vertices in the
given graph.
12
Tutorial – 2
Solving problems on O, o, Ω, Θ notations
Programming simple graph types
Mr. Khumoyun Aminaddinov
Show answer
Auto Play
Slide 1 / 12
SLIDE
Similar Resources on Wayground
10 questions
Adding Rational Expressions
Presentation
•
10th - 12th Grade
9 questions
Volume- Sphere, Cone, Cylinder
Presentation
•
8th Grade
9 questions
Narrative Elements Review
Presentation
•
7th Grade
10 questions
Identifying Slopes
Presentation
•
9th Grade
9 questions
Scatterplots-lesson
Presentation
•
7th Grade
9 questions
Like and Unlike Fractions
Presentation
•
5th - 7th Grade
9 questions
2024 DP CCE on Budget 2024
Presentation
•
10th Grade
10 questions
Spanish Estar and prepositions with place
Presentation
•
10th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Other
26 questions
SLIME!!!!!
Quiz
•
KG - 12th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
4 questions
K-2 Force and Motion Lesson
Presentation
•
KG - 2nd Grade
12 questions
Tone and Mood
Presentation
•
KG
10 questions
Day and Night Patterns
Quiz
•
KG
20 questions
Disney Characters
Quiz
•
KG
12 questions
Nouns and Verbs
Quiz
•
KG - 2nd Grade
15 questions
Short Vowels
Quiz
•
KG - 2nd Grade