Skip to content

yash-gulatii/Mastering_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python Mastery Challenge: Roadmap Edition

Welcome to the Python Mastery Challenge! In this challenge, i will follow the roadmap provided by roadmap.sh to further enhance my Python skills and become a master in the language. The challenge is designed to help me reinforce my existing knowledge while exploring advanced topics and best practices in Python.The key to mastering Python is practice and hands-on experience. I will allocate dedicated time to work on each section of the roadmap, completing exercises, and building projects. I will append my learning in this readme file sorted by days.

Day 1 of Python Mastery Challenge (27 June 2023) - Datastructures and Algorithms πŸ—“οΈπŸ

  • πŸ“š Explored algorithms and their qualities

  • πŸ’‘ Learned about data structures and their importance

  • 🧡 Discussed linear and non-linear data structures

  • πŸ”’ Explored array, stack, queue, and linked list

Day 2 of Python Mastery Challenge (28 June 2023) - Asymptotic Analysis πŸ“šπŸ”

  • πŸ”’ Explored Big-O, Omega, and Theta notations

  • ⏰ Discussed the efficiency of algorithms based on input size

  • πŸ’‘ Learned about the Master Theorem for solving recurrence relations

Day 3 of Python Mastery Challenge (29 June 2023) πŸ“šπŸ’»

  • πŸ” Explored Divide and Conquer Algorithm

  • βœ‚οΈ Understood the divide, conquer, and combine steps

  • ⏱️ Calculated time complexity using the master theorem

  • πŸ”„ Compared Divide and Conquer with Dynamic approach

Day 4 of Python Mastery Challenge (30 June 2023) πŸ“šπŸ’»

  • πŸ” Explored the Stack data structure, which follows the Last In First Out (LIFO) principle

  • βœ‚οΈ Learned about basic operations of a stack: Push, Pop, IsEmpty, IsFull, and Peek

  • πŸ“ Implemented a stack in Python using arrays/lists

  • ⏱️ Analyzed the time complexity of stack operations (O(1))

  • 🧰 Discovered various applications of the stack data structure

Day 5 of Python Mastery Challenge (01 July 2023) πŸ“šπŸ’»

  • πŸ” Explored Queue Data Structure

  • βž• Implemented a Simple Queue in Python

  • πŸ”„ Explored Circular Queue and its advantages

  • πŸ”’ Implemented Circular Queue class in Python

  • πŸ“₯ Enqueued and dequeued elements

Day 6 of Python Mastery Challenge (07 July 2023) πŸ“šπŸ’»

  • πŸ” Explored Priority Queue and its implementation

  • βœ… Learned about assigning priority values and difference with normal queue

  • βš™οΈ Implemented Priority Queue using the heap data structure

  • πŸ”„ Covered insertion, deletion, peeking, and extracting operations

  • πŸ”’ Explored the applications of Priority Queue

Also learned about Deque (Double Ended Queue):

  • πŸ” Understand the concept and types of Deque

  • πŸ” Explored operations on a Deque (insertion, deletion, checking empty/full)

  • πŸ–₯️ Implemented Deque in Python using a list

Day 7 of Python Mastery Challenge (12 July 2023) πŸ“šπŸ’»

  • πŸ”₯ Explored Linked Lists and their implementation in Python. Learned about singly, doubly, and circular types. πŸ”„

  • πŸ’‘ Implemented various operations on Linked Lists: traversal, insertion, deletion, search, and sorting. πŸ“

  • βš™οΈ Also delved into Hash Tables - an efficient data structure for key-value storage using hash functions. πŸ”‘πŸ—„οΈ

  • 🌟 Building a strong foundation in Data Structures and Algorithms through this challenge! πŸ’ͺ

  • πŸ”— Linked Lists, πŸ—ƒοΈ Hash Tables, and πŸš€ Python coding skills coming together! Exciting journey ahead! 🌈

Day 8 of Python Mastery Challenge (23 July 2023) πŸ“šπŸ’»

  • πŸ” Explored the "Heap Data Structure" πŸ“Š

    • Heap is a complete binary tree satisfying the heap property: max heap (parent > child) or min heap (parent < child).
    • Key applications include priority queues, Dijkstra's algorithm, and heap sort.
  • πŸ“ˆ Understood Heap Operations:

    • Heapify: Convert binary tree to a heap (max or min).
    • Insert: Add an element to the heap and maintain the heap property.
    • Delete: Remove an element from the heap and rearrange to maintain the heap property.
    • Peek: Get the maximum/minimum element without removing it.
    • Extract-Max/Min: Get and remove the maximum/minimum element from the heap.
  • πŸ“ Studied Fibonacci Heap:

    • Collection of min heap-ordered trees with efficient operations.
    • Supports union, insert, extract min, decrease key, and delete node operations.
  • πŸ”’ Python Example for Fibonacci Heap:

    • Implemented Fibonacci Heap and tested insertion, extract min operations.

Day 9 of Python Mastery Challenge (01 August 2023) πŸ“šπŸ’»

  • πŸ” Today, delved into the "Decrease Key and Delete Node Operations" πŸ”„ on a Fibonacci Heap 🌿

  • 🌟 A Fibonacci heap is tree-based and efficient, surpassing binomial and binary heaps in time complexity for certain operations.

  • βš™οΈ Learned about "Decrease a Key" operation:

    • Decreases a key's value to a lower one.
    • Utilizes functions like Decrease Key, Cut, and Cascading-Cut to maintain the heap's properties.
  • 🎯 Decrease Key Example:

    • Explored examples of decreasing keys from 46 to 15 and 35 to 5, demonstrating the Cut and Cascading-Cut operations.
  • βš™οΈ Explored "Deleting a Node" operation:

    • Utilizes decrease-key and extract-min operations to remove a given node from the heap.
  • πŸ“ Shared Python Example for Fibonacci Heap:

    • Implemented Fibonacci Heap and tested operations with example elements.
  • πŸ”’ Complexities:

    • Decrease Key: O(1)
    • Delete Node: O(log n)
  • πŸ”— Solved a Leetcode question "Contains Duplicate" using Python and a hashset. 🐍

Day 10 of Python Mastery Challenge (02 August 2023) πŸ“šπŸ’»

  • πŸŒ³πŸ” Explored Tree Data Structure! 🌳

  • πŸ”Ž Tree is a nonlinear hierarchical data structure consisting of nodes connected by edges. 🌿

  • πŸ“š Tree Terminologies:

    • Nodes: Entities with key/value and pointers to child nodes.
    • Edges: Links between nodes.
    • Root: Topmost node.
    • Height of a Node: Number of edges to deepest leaf.
    • Depth of a Node: Number of edges from root to node.
    • Height of a Tree: Height of root or depth of deepest node.
    • Degree of a Node: Total branches of a node.
    • Forest: Collection of disjoint trees.
  • 🌟 Tree Applications:

    • Binary Search Trees (BSTs) for quick element presence check.
    • Heap for heap sort.
    • Tries in modern routers for routing info.
    • Popular databases use B-Trees and T-Trees for data storage.
    • Compilers use syntax trees for program validation.

🌳 Day 11 of Python Mastery Challenge (03 August 2023) πŸ“šπŸ’»

  • πŸ” Explored "Tree Traversal" in Data Structures and Algorithms.

  • 🌿 Traversing a tree means visiting every node in the hierarchical structure, unlocking a realm of possibilities for operations like summing values or finding the largest one.

  • πŸ”„ Learned three traversal techniques: "Inorder," "Preorder," and "Postorder."

    • 1️⃣ Inorder: Left subtree ➑️ Root ➑️ Right subtree.
    • 2️⃣ Preorder: Root ➑️ Left subtree ➑️ Right subtree.
    • 3️⃣ Postorder: Left subtree ➑️ Right subtree ➑️ Root.
  • 🌟 Embracing these techniques not only respects the hierarchy of the tree but also maintains the correct order of nodes throughout the process.

  • 🌳 Dived into the captivating world of "Binary Trees."

  • ✨ Encountered types like Full, Perfect, Complete, Degenerate, Skewed, and Balanced Binary Trees.

  • πŸ“ Implemented Python examples for tree traversal and delved deeper into the exciting realm of Binary Trees.

  • 🎯 Excited to tackle Leetcode's "Two Sum" question next! Let's keep up the momentum! πŸ’ͺ

Day 12 of Python Mastery Challenge (04 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "Full Binary Trees" - every parent has 2 or no children.

  • 🌿 Dived into "Perfect Binary Trees" - nodes have 2 child nodes, leaves at the same level.

  • 🌳 "Complete Binary Trees" - all levels filled, last element may lack right sibling.

  • 🌟 Python examples checked binary tree types.

  • πŸ“ Practice with Python examples.

Day 13 of Python Mastery Challenge (06 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "Balanced Binary Tree" with conditions for height balance. πŸ“šπŸŒŸ

  • πŸ“ Noted complexities (time and space) of BST operations. πŸ’»

  • 🌟 Discussed "Binary Search Tree (BST)" for maintaining sorted lists of numbers, explained properties, search, insert, and delete operations. 🌿

  • 🌳 Discovered "AVL Tree" - self-balancing binary search tree with balance factors (-1, 0, +1) for each node, named after Grorgy Adelson-Velsky and Landis. 🌟

  • 🌟 Noted complexities of AVL tree operations - insertion, deletion, and search. πŸš€

  • 🌟 Delved into "BST Applications" - used in multilevel indexing, dynamic sorting, and managing virtual memory areas in Unix kernel. πŸ’»πŸ†

  • 🌿 Explained "Balance Factor" - difference between height of left and right subtrees, crucial for AVL tree's self-balancing property. 🌳

  • πŸš€ Explored "Operations on an AVL Tree" - rotating subtrees for left, right, left-right, and right-left cases. πŸ”„

Day 14 of Python Mastery Challenge (07 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "B-tree" - a self-balancing search tree with multiple keys and children, ideal for faster disk accesses.

  • πŸ’» Discussed properties, operations - search, insertion, and deletion on B-tree.

  • πŸš€ B-tree Applications: databases, file systems, multilevel indexing, and storing blocks of data.

  • βž• Insertion Operation - search appropriate node and split if required for inserting elements.

  • πŸ“ Insertion Example with step-by-step illustrations.

  • βž– Deletion Operation - search node, delete key, and balance tree to avoid underflow.

  • πŸ”„ Cases for Deletion - handling leaf and internal node deletions, and shrinking tree height.

Day 15 of Python Mastery Challenge (08 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "B+ Tree" - an advanced self-balancing structure where all values reside in leaf nodes, enhancing data access. πŸ“šπŸŒŸ

  • πŸ’‘ Understood multilevel indexing and its role. πŸ§ πŸ”—

  • πŸ”‘ Key Properties of B+ Tree: uniform leaf levels, children count, and key limits. βš™οΈ

  • πŸ”„ Compared B+ Tree with B-tree for data pointer location and connections. 🌿

  • πŸš€ B+ Tree's Efficiency: Faster operations and searching due to connected leaves. πŸ“ˆβš‘οΈ

  • ➑️ Unveiled "Searching on B+ Tree" - a step-by-step process to locate data. πŸ”

  • πŸ” Illustrated Searching Example with a clear visual walkthrough. πŸ–ΌοΈ

  • 🏁 Explored B+ Tree Applications: Multilevel indexing, efficient database operations. πŸ—‚οΈπŸ’

  • βž• "Insertion on B+ Tree" - Seek leaf, insert, and balance/split. πŸ“₯🌱

  • πŸ“ Detailed Insertion Example with easy-to-follow illustrations. πŸ“

  • βž– Tackling "Deletion from B+ Tree" - Search node, delete key, and maintain balance. πŸ“€βŒ

  • πŸ”„ Case-wise Deletion Strategies - managing leaf and internal node deletions, handling height changes. πŸ”€

Day 16 of Python Mastery Challenge (09 August 2023) πŸ“šπŸ’»

  • 🌳 Dived into "Red-Black Tree" - a self-balancing binary search tree with a color-coded twist, maintaining optimal data organization.

  • ❀️ Explored Red/Black Property, Root & Leaf Properties, and Depth Property, ensuring a balanced structure.

  • 🎨 Visualized a Red-Black Tree example, highlighting its color-coded nodes.

  • πŸ”„ Unveiled tree-balancing operations - Rotations, including Left, Right, Left-Right, and Right-Left.

  • πŸ’Ύ Mastered "Insertion in Red-Black Tree" - adding new nodes as RED, followed by recoloring and rotation adjustments.

  • ❌ Delved into "Deletion from Red-Black Tree" - a detailed algorithm to remove nodes while maintaining balance.

  • πŸ” Explored Red-Black Tree's versatile applications, from finite maps to key Java packages and Linux Kernel.

Day 17 of Python Mastery Challenge (11 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "Insertion in Red-Black Tree" - a process of maintaining balance and properties while adding nodes.

  • πŸ”΄ New nodes always start as RED to avoid depth property violation, ensuring a simpler fix.

  • 🎨 Illustrated the step-by-step journey of inserting a new node, from traversal to color assignment.

  • πŸ”„ Delved into the intricate dance of tree rotations and recoloring to retain balance.

  • πŸ’Ύ Perfected the "InsertFix-algorithm" - a powerful tool to ensure the red-black property post-insertion.

  • πŸ”— Grasped why new nodes are red - a smart strategy to ease depth property management.

  • 🌲 Wrapped up with a complete algorithm to maintain red-black tree properties after node insertion.

Day 18 of Python Mastery Challenge (12 August 2023) πŸ“šπŸ’»

  • 🌳 Explored "Deletion from Red-Black Tree" - a delicate process to maintain balance and properties post-node removal.

  • πŸ”΄ Dismantled the intricacies of deletion, paving the way to restore red-black harmony.

  • πŸ› οΈ Illustrated a step-by-step algorithm for node deletion, covering diverse scenarios with precision.

  • πŸ”„ Mastered the "DeleteFix-algorithm" - a dynamic tool to ensure red-black property restoration after deletion.

  • βš–οΈ Unveiled how a black node's removal triggers a dance of rotations and recoloring to mend depth violations.

  • 🌲 Wrapped up with a comprehensive flowchart capturing the intricate workflow of deletion cases.

Day 19 of Python Mastery Challenge (15 August 2023) πŸ“šπŸ’»

Day 20 of Python Mastery Challenge (16 August 2023) πŸ“šπŸ’»

  • 🌐 Created "Downloadify" - A Django-React project, creating its first web page. Exciting journey ahead!

  • πŸ“š Dived into "Data Structures & Algorithms in Python (Google)" at Udacity.

  • πŸ” Explored the Binary Search algorithm: an elegant dance of target hunting in a sorted array.

  • πŸ”„ Traced the efficient steps: target comparison, array division, and iterative repetition. Efficiency scales logarithmically!

  • πŸ”„ Deepened the understanding of Recursion - a function's enchanting journey of self-discovery and reinvocation.

Day 21 of Python Mastery Challenge (17 August 2023) πŸ“šπŸ’»

  • πŸ“š Delved deeper into "Data Structures & Algorithms in Python (Google)" at Udacity.

  • πŸ”’ Explored the realm of Sorting algorithms: Bubble Sort, Merge Sort, and Quick Sort.

  • πŸ” Uncovered the nuances of Bubble Sort's naive approach: comparisons, swaps, and printouts. Not the most efficient, but has its charms!

  • ⚑️ Unleashed the power of Quick Sort: pivoting, comparing, and fixing element positions. A versatile warrior with varying efficiency!

  • 🌌 Embarked on the Divide and Conquer journey with Merge Sort: breaking, merging, and conquering arrays. A balanced dance of efficiency!

Day 22 of Python Mastery Challenge (21 August 2023) πŸ“šπŸ’»

  • πŸ“š Navigated through "Data Structures & Algorithms in Python (Google)" on Udacity.

  • πŸ—ΊοΈ Explored the captivating world of Maps: akin to dictionaries, they house keys and values, revealing definitions to the world.

  • πŸ”£ Delved into Sets: a sanctuary for unique elements, providing clarity and distinction amidst the chaos of repetition.

  • πŸ—„οΈ Unveiled the enigma of Hashing: transforming values into hashes via the mystical Hash Function, encountering the phenomenon of Collisions along the way.

  • πŸ“¦ Discovered the concept of Hash Maps: transforming key-value pairs into hashes, unleashing the power of efficient retrieval and storage.

Day 23 of Python Mastery Challenge (22 August 2023) πŸ“šπŸ’»

  • 🌳 Explored Trees: root, leaves, levels (ancestors, parents, descendants, leafs), siblings.

  • 🌲 Tree Traversal: DFS (pre, in, post-order), BFS (level order).

  • πŸ” Binary Search Trees: Search (O(n)), Delete (leaf: O(1), parent: O(n)).