Youtube Data Strcutre and Algorithms New Baghdad
Youtube Data Strcutre and Algorithms New Baghdad
OpenDSA
2-Big-O Notation
How to implement DS on Worst Case scenario move from worst level to best level
Try to reduce complexity from n square >>> n or anything better than before
How to implement code on worst case scenario
Space and Time Complexity
Every time when need to add new element in last not enough size >> we will double size of array
6- implement dynamic array in java
7- Linked List Structure|| هيكلية لنك لست
عندم يكون لديك حجم محدد من زاكرة يفضل استدخماها على االراي
2 > 3 > then use 4 and so on
Array more faster access for a lot access process prefer array
More a lots from Add delete process prefer to use link list instead array
8- implement Linked list in java
9- Stack Structure|| شرح
LIFO
When add reach stack is fill
Need insert & delete >> Stack not access & Search
10- implement Stack in Java
StackArrayDynamic
Stack >> Link list
مفش داعي تبحث في البيانات الي بتبدا في 00وانت تريد ان تبحث عن 11
Then maybe to apply Binear Search to divide more access
23- Interpolation Search implementation in
Java
99999 linear >> 20 times Binary >> 1 interpolation due to search nearly unique not similarity with
others
Get out >> put on last Tree and so on ( n times ) Tree ( Log n )
Q(n Log n)
) Space O(1كل هادي عملية حتم داخل االراي محددة مش حتوخد مساحة تانيه علشان هيك
Very important compare merge with Heap
30- implement Heap Sort in Java
Very important Code to implement
جانب االيمن من النود كله يكون اكبرمنو وهكذا وجانب االيسر اصغر
Search 11 >> Faster >> Compare on each node this is greater or smaller
بدي ابحث عن المكان اللي بدي اتواجد فيه >> Add 14
Each node >> Compare > or <
Delete
If have two child >> node that delete ( important note ) >> Delete 13
We need to remove node 12 >> Becode node 10 >> more than two child >> Problems Appear
34- Binary tree implementation in Java
Important define instances
35- Graph Representation with Matrix vs
Adjacency list|| تمثيل البيانات
Direction Graph >> باتجاه واحد
Adjacency list >> Array with link List
36- Depth First Search(DFS) || تصفح االشجار
Go to (Lowest ) >> non-return for past if reach end then backtrack (remove from stack) does not need
from search process
زار االولى وتانية خلص بروح على اللي ضايله
37- DFS implementation in Java(Very
important Code)
Using Adj-List (array with link list)
38- Breadth First Search (BFS) || تصفح
االشجار
Differ used Queue while Depth used Stack
Cursor (Front) after remove A on B >> what is Child of B ?
Then repeat process for C ?
وبعدين بتحط في الكيو جميع المسارات للنقط اللي رايح عليها بتجيب كل اللي متصالت في ااه
امسحها وخدها بلاير كوست
مفهوم البرمجة ||43- Dynamic Programming
الديناميكية
A lot of recursions will be done >> Large problem
ما زال الحلول ابتتكرر وما زال المشكلة بتتكرر حاول اختزل عملك
44- Dynamic Programming- edit distance||
كيف يعرف كوكل بماذا تفكر
نبحث عن العمليات المتشابهة واللمتكررة
توجد عمليات تكرر اكثر من مرة
علشان احول كلمة كات ل دوق محتاج اغير 3احرف يعني تكلفة3
Travel Salesman
وال وحدا منهم تسطيع حل المشكلة
كيف بدي اعرف انو المشكلة ال يمكن حلها
لمن يكون االنبت غير متناسق مع االوت بوت
46- Knapsack problem HW|| واجب سارق
المتجر
?كيف كانت مقابلتي مع كوكل وماهي االسئلة 47-
حل سؤال االول Linklist Stack
Team 2: Cities
Depth first Search solution used Back-Tracking
Team 3 >> Hash_Map
Team 4 : Binary Tree >> Two Equally Tree
Team 5 :
Draw Triangle >> Cover all Triangles