

Урок без названия
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
Disney
Presentation
•
1st - 2nd Grade
9 questions
El PBI - Unidad 3
Presentation
•
University
11 questions
Communicable and Non-Communicable Diseases
Presentation
•
4th Grade
11 questions
Making Claims- Restating the Question
Presentation
•
1st - 8th Grade
9 questions
Domain 2 Lesson 2
Presentation
•
9th - 12th Grade
8 questions
Growth Mindset
Presentation
•
5th Grade
10 questions
French- Les Conjunctions
Presentation
•
6th Grade
10 questions
Spot the Difference
Presentation
•
6th - 8th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade
Discover more resources for Other
6 questions
FOREST Generosity
Presentation
•
KG
21 questions
Star Wars
Quiz
•
KG - 12th Grade
16 questions
3D Shapes
Quiz
•
KG - 1st Grade
10 questions
Word Knowledge and Skills #3
Quiz
•
KG - 8th Grade
24 questions
5th Grade Math EOG Review
Quiz
•
KG - University
73 questions
NWEA MATH Practice 161-170
Quiz
•
KG - 3rd Grade
13 questions
Time
Quiz
•
KG - 2nd Grade
12 questions
Alliteration Practice
Quiz
•
KG - 5th Grade