{"id":17477703,"url":"https://github.com/serverx-org/dsa-mastery","last_synced_at":"2026-02-28T11:37:07.626Z","repository":{"id":214987122,"uuid":"734769846","full_name":"serverx-org/DSA-MASTERY","owner":"serverx-org","description":"This repository covers the roadmap for mastering Data Structures and Algorithms in JavaScript, Python, C/C++, and Java.","archived":false,"fork":false,"pushed_at":"2024-10-29T12:03:36.000Z","size":9796,"stargazers_count":13,"open_issues_count":9,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T21:22:50.435Z","etag":null,"topics":["algorithms","algorithms-and-data-structures","compitative-coding","compititive-programming","cpp","dsa","dsa-mastery","hacktoberfest","hacktoberfest-2024","java","js","learn-dsa","py","server-x-101","serverx"],"latest_commit_sha":null,"homepage":"https://serverx.org.in/articles/dsa-mastery/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverx-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gautamankoji"]}},"created_at":"2023-12-22T15:10:25.000Z","updated_at":"2025-01-16T05:32:27.000Z","dependencies_parsed_at":"2024-01-03T16:47:44.633Z","dependency_job_id":"0b445a9a-72cf-4363-acc9-01ee11ecffce","html_url":"https://github.com/serverx-org/DSA-MASTERY","commit_stats":{"total_commits":115,"total_committers":17,"mean_commits":6.764705882352941,"dds":0.4521739130434783,"last_synced_commit":"f7f6011071b7f6413e07abebf40e15dc5bc9ff5e"},"previous_names":["server-x-101/dsa-basic-to-advanced","server-x-101/dsa-mastery","serverx-org/dsa-mastery"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverx-org%2FDSA-MASTERY","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverx-org%2FDSA-MASTERY/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverx-org%2FDSA-MASTERY/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverx-org%2FDSA-MASTERY/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverx-org","download_url":"https://codeload.github.com/serverx-org/DSA-MASTERY/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002103,"owners_count":19732164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","algorithms-and-data-structures","compitative-coding","compititive-programming","cpp","dsa","dsa-mastery","hacktoberfest","hacktoberfest-2024","java","js","learn-dsa","py","server-x-101","serverx"],"created_at":"2024-10-18T20:09:03.592Z","updated_at":"2026-02-28T11:37:07.573Z","avatar_url":"https://github.com/serverx-org.png","language":"C++","funding_links":["https://github.com/sponsors/gautamankoji"],"categories":[],"sub_categories":[],"readme":"# DSA-MASTERY\n\n\u003cdiv align=\"center\"\u003e\n   \u003ca href=\"https://github.com/SERVER-X-101/\"\u003e\u003cimg alt=\"Repo Name\" title=\"repo name\" target=\"_blank\" src=\"https://img.shields.io/badge/server_x_101-dsa_mastery-50CCA0?style=for-the-badge\"\u003e\u003c/a\u003e\u003c/br\u003e\n   \u003ca href=\"https://github.com/SERVER-X-101/DSA-MASTERY\"\u003e\u003cimg alt=\"Repo Size\" title=\"repo size\" target=\"_blank\" src=\"https://img.shields.io/github/repo-size/SERVER-X-101/DSA-MASTERY?style=for-the-badge\u0026color=50CCA0\u0026logo=github\"\u003e\u003c/a\u003e\n   \u003ca href=\"./CONTRIBUTING.md\"\u003e\u003cimg alt=\"Repo Contributors\" title=\"repo contributors\" target=\"_blank\" src=\"https://img.shields.io/github/contributors/SERVER-X-101/DSA-MASTERY?style=for-the-badge\u0026color=50CCA0\u0026logo=github\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/SERVER-X-101/DSA-MASTERY\"\u003e\u003cimg alt=\"Repo Stars\" title=\"repo stars\" target=\"_blank\" src=\"https://img.shields.io/github/stars/SERVER-X-101/DSA-MASTERY?style=for-the-badge\u0026color=50CCA0\u0026logo=github\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/SERVER-X-101/DSA-MASTERY\"\u003e\u003cimg alt=\"Repo Forks\" title=\"repo forks\" target=\"_blank\" src=\"https://img.shields.io/github/forks/SERVER-X-101/DSA-MASTERY?style=for-the-badge\u0026color=50CCA0\u0026logo=github\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://server-x-101.github.io/articles/dsa-mastery/\"\u003e\u003cimg height=\"28px\" alt=\"Site Up\" title=\"site up\" target=\"_blank\" src=\"https://napkin-examples.npkn.net/site-status-badge/\"\u003e\u003c/a\u003e \n\u003c!-- \u003ca href=\"https://github.com/SERVER-X-101/DSA-MASTERY\"\u003e\u003cimg height=\"28px\" alt=\"Site Down\" title=\"site down\" target=\"_blank\" src=\"https://napkin-examples.npkn.net/site-status-badge/400\"\u003e\u003c/a\u003e --\u003e\n\u003c/div\u003e\n\n\u003c/br\u003e\n\n\u003e [!TIP]\n\u003e **DSA Mastery in 9 Weeks: Read, Solve, Code!**\n\n\n\u003c!-- This repository covers a range of Data Structures and Algorithms (DSA) implementations, spanning from introductory to advanced levels. --\u003e\nThis repository covers the roadmap for mastering Data Structures and Algorithms in JavaScript, Python, C/C++, and Java.\n\n|       | \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; **TABLE OF CONTENTS** \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| :---: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|   •   | [**DSA Roadmap**](#data-structures-and-algorithms-roadmap)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n|   •   | [**JavaScript DSA**](./JavaScript/README.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n|   •   | [**Python DSA**](#python---data-structures-and-algorithms)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n|   •   | [**C/C++ DSA**](#cc---data-structures-and-algorithms)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n|   •   | [**Java DSA**](#java---data-structures-and-algorithms)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n|   •   | \u003cdetails\u003e \u003csummary\u003e\u003ca target=\"_blank\" href=\"#dsa-practice-sheets\"\u003e\u003cb\u003eDSA Practice Sheets\u003c/b\u003e\u003c/a\u003e\u003c/summary\u003e \u003cp\u003e ◌ \u003ca target=\"_blank\" href=\"#1-strivers-sde-sheet--top-coding-interview-problems\"\u003e\u003cb\u003eStrivers DSA Cheat Sheet\u003c/b\u003e\u003c/a\u003e \u003cbr/\u003e ◌ \u003ca target=\"_blank\" href=\"#2-dsa-sheet-by-love-babbar\"\u003e\u003cb\u003eLove Babar DSA Cheat Sheet\u003c/b\u003e\u003c/a\u003e  \u003cbr/\u003e ◌ \u003ca target=\"_blank\" href=\"#3-apna-college-dsa-sheet\"\u003e\u003cb\u003eApna College DSA Cheat Sheet\u003c/b\u003e\u003c/a\u003e  \u003cbr/\u003e ◌ \u003ca target=\"_blank\" href=\"#4-neetcode-150\"\u003e\u003cb\u003eNeetCode 150 DSA Cheat Sheet\u003c/b\u003e\u003c/a\u003e  \u003cbr/\u003e ◌ \u003ca target=\"_blank\" href=\"#5-dsa-sheet-by-arsh-60-days-plan\"\u003e\u003cb\u003eDSA Sheet by Arsh (45–60 Days Plan)\u003c/b\u003e\u003c/a\u003e  \u003cbr/\u003e ◌ \u003ca target=\"_blank\" href=\"#6-algopreps-151-problems-sheet\"\u003e\u003cb\u003eAlgoPrep’s 151 Problems Sheet\u003c/b\u003e\u003c/a\u003e \u003c/p\u003e \u003c/details\u003e |  |\n\n## Data Structures and Algorithms Roadmap\n\n\n\u003cdiv\u003e\n\n   \u003cimg src=\"./00-dsa-roadmap/dsa-roadmap.png\" title=\"DSA Roadmap\" alt=\"DSA Roadmap\"/\u003e\n\n\u003c/div\u003e\n\n\n## 5 steps to Mastering DSA\n\nMastering DSA as a beginner is simplified into 5 steps:\n\n1. Choose a programming language.\n2. Understand time and space complexities.\n3. Learn basic data structures and algorithms.\n4. Practice a lot.\n5. Join competitions to get really good.\n\n## INDEX\n\n| Steps | Table of Contents                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| :---: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|  1.   | [**Master at least one Programming Language**](#1-master-at-least-one-programming-language)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n|  2.   | [**Understand Complexities**](#2-understand-complexities)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n|  3.   | \u003cdetails open\u003e\u003csummary\u003e\u003ca href=\"#3-learn-essential-data-structures-and-algorithms\"\u003e\u003cb\u003eLearn essential Data Structures and Algorithms, including:\u003c/b\u003e\u003c/a\u003e\u003c/summary\u003e\u003cp\u003e ◌ \u003ca href=\"#31-mathematics-basic\"\u003e**3.1 - Mathematics Basic**\u003c/a\u003e \u003c/br\u003e ◌ \u003ca href=\"#32-array\"\u003e**3.2 - Array**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#33-string\"\u003e**3.3 - String**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#34-stack\"\u003e**3.4 - Stack**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#35-queue\"\u003e**3.5 - Queue**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#36-searching-algorithm\"\u003e**3.6 - Searching Algorithm**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#37-sorting-algorithm\"\u003e**3.7 - Sorting Algorithm**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#38-divide-and-conquer-algorithm\"\u003e**3.8 - Divide and Conquer Algorithm**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#39-linked-list\"\u003e**3.9 - Linked List**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#310-tree-data-structure\"\u003e**3.10 - Tree Data Structure**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#311-graph-data-structure\"\u003e**3.11 - Graph Data Structure**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#312-recursion\"\u003e**3.12 - Recursion**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#313-backtracking-algorithm\"\u003e**3.13 - Backtracking Algorithm**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#314-dynamic-programming\"\u003e**3.14 - Dynamic Programming**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#315-greedy-methodology\"\u003e**3.15 - Greedy Methodology**\u003c/a\u003e\u003c/br\u003e ◌ \u003ca href=\"#316-mathematics-advanced\"\u003e**3.16 - Mathematics Advanced**\u003c/a\u003e \u003c/p\u003e\u003c/details\u003e |\n|  4.   | [**Practice consistently and extensively**](#4-practice-consistently-and-extensively)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n|  5.   | [**Compete to advance and become proficient**](#5-compete-to-advance-and-become-proficient)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n\n## 1. Master at least one Programming Language\n\nEmbark on your data structures and algorithms journey by mastering a programming language. Just as we learn the alphabet and grammar before writing essays, understanding the basics of a language is essential for programming.\n\nChoose a language, whether it's [**Java**](https://www.geeksforgeeks.org/java/), [**C**](https://www.geeksforgeeks.org/c-programming-language/), [**C++**](https://www.geeksforgeeks.org/c-plus-plus/), [**Python**](https://www.geeksforgeeks.org/python-programming-language/), or any other of your preference. Before diving into coding, grasp the foundational elements of the language, including basic syntax, data types, variables, operators, conditional statements, loops, functions, etc. Optionally, explore Object-Oriented Programming (OOP) concepts to strengthen your coding foundation.\n\n## 2. Understand Complexities\n\nNow, let's delve into an interesting and crucial topic. The main goal of using DSA is to solve problems effectively and efficiently. How do you assess if your program is efficient? This is where complexities come in, and there are two types:\n\n1. **Time Complexity:** It measures the time needed to execute the code.\n2. **Space Complexity:** It indicates the space required for the code to function successfully.\n3. **Design And Analysis Of Algorithms**\n   - Designing efficient algorithms and analyzing their performance.\n   - Lecture Notes: [**Design And Analysis Of Algorithms**](https://ocw.mit.edu/courses/6-046j-design-and-analysis-of-algorithms-spring-2012/pages/lecture-notes/)\n\nIn DSA, you'll often encounter the term Auxiliary Space, referring to extra space used in the program beyond the input data structure.\n\nIt overlooks system-dependent constants and focuses solely on the number of modular operations performed in the entire program. Three commonly used asymptotic notations describe the time complexity of algorithms:\n\n\u003c!-- \u003cp align=\"center\"\u003e --\u003e\n   \u003c!-- \u003cimg src=\"./assets/time_complexity/tc_graph.png\" align=\"center\" alt=\"Time Complexity of Algorithms\"\u003e --\u003e\n   \u003c!-- \u003cp style=\"text-align: center; font-size: 9px;\"\u003eTime Complexity of Algorithms\u003c/p\u003e --\u003e\n\u003c!-- \u003c/p\u003e --\u003e\n\n1. **Big-O Notation (Ο):** Describes the worst-case scenario.\n2. **Omega Notation (Ω):** Specifies the best-case scenario.\n3. **Theta Notation (θ):** Represents the average complexity of an algorithm.\n\n### Asymptotic analysis (Big-O notation)\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cb\u003eBasics: Asymptotic analysis\u003c/b\u003e\u003c/summary\u003e\u003ctable\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBig-O notation in 5 minutes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=__vX2sjlpXU\"\u003e\u003cb\u003eYouTube\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eParticularly for Big-O notation\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://runestone.academy/ns/books/published//pythonds/AlgorithmAnalysis/toctree.html\"\u003e\u003cb\u003erunestone.academy\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/details\u003e\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cb\u003eAdvanced: Asymptotic analysis\u003c/b\u003e\u003c/summary\u003e\u003ctable\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eA beginner's guide to Big O notation\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://robbell.io/2009/06/a-beginners-guide-to-big-o-notation\"\u003e\u003cb\u003erob-bell.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eParticularly for Big-O notation\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=v4cd1O4zkGw\"\u003e\u003cb\u003eYouTube\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLecture 2: Asymptotic Notation CSCI 700\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://web.archive.org/web/20171215122943/http://eniac.cs.qc.cuny.edu/andrew/csci700/lecture2.pdf\"\u003e\u003cb\u003eweb.archive.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/details\u003e\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cb\u003ePractice: Time and Space Complexity\u003c/b\u003e\u003c/summary\u003e\u003ctable\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMCQs: Time and Space Complexity\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/multiple-choice-questions-related-about-time-and-space-complexity-of-a-program/17976\"\u003e\u003cb\u003eCodeChef\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eParticularly for Big-O notation\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=v4cd1O4zkGw\"\u003e\u003cb\u003eYouTube\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cp\u003e◌ \u003cb\u003ePractice Problems\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iitk.ac.in/esc101/08Jul/lecnotes/practise_sol.pdf\"\u003e\u003cb\u003eIITK Lecture Practice\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3. Learn essential Data Structures and Algorithms\n\n\u003cp\u003e\n ◌ \u003ca href=\"#31-mathematics-basic\"\u003e\u003cb\u003e3.1 - Mathematics Basic\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#32-array\"\u003e\u003cb\u003e3.2 - Array\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#33-string\"\u003e\u003cb\u003e3.3 - String\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#34-stack\"\u003e\u003cb\u003e3.4 - Stack\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#35-queue\"\u003e\u003cb\u003e3.5 - Queue\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#36-searching-algorithm\"\u003e\u003cb\u003e3.6 - Searching Algorithm\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#37-sorting-algorithm\"\u003e\u003cb\u003e3.7 - Sorting Algorithm\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#38-divide-and-conquer-algorithm\"\u003e\u003cb\u003e3.8 - Divide and Conquer Algorithm\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#39-linked-list\"\u003e\u003cb\u003e3.9 - Linked List\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#310-tree-data-structure\"\u003e\u003cb\u003e3.10 - Tree Data Structure\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#311-graph-data-structure\"\u003e\u003cb\u003e3.11 - Graph Data Structure\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#312-recursion\"\u003e\u003cb\u003e3.12 - Recursion\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#313-backtracking-algorithm\"\u003e\u003cb\u003e3.13 - Backtracking Algorithm\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#314-dynamic-programming\"\u003e\u003cb\u003e3.14 - Dynamic Programming\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#315-greedy-methodology\"\u003e\u003cb\u003e3.15 - Greedy Methodology\u003c/b\u003e\u003c/a\u003e \u003c/br\u003e\n ◌ \u003ca href=\"#316-mathematics-advanced\"\u003e\u003cb\u003e3.16 - Mathematics Advanced\u003c/b\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n## 3.1 Mathematics Basic\n\n### Basic Mathematics in DSA\n\n- Fundamental for evaluating algorithm effectiveness.\n- Essential for problems with mathematical characteristics.\n- Crucial for mastering Data Structures and Algorithms.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Mathematics\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#1-gcd-and-hcf-euclidean-algorithm\"\u003e\u003cb\u003eGFG: GCD and HCF (Euclidean Algorithm)\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#2-divisors-of-a-number\"\u003e\u003cb\u003eGFG: Divisors of a number\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#3-prime-numbers-using-sieve-of-eratosthenes/\"\u003e\u003cb\u003eGFG: Prime numbers using Sieve of Eratosthenes\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#4-square-root\"\u003e\u003cb\u003eGFG: Square root\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#5-modular-arithmetic\"\u003e\u003cb\u003eGFG: Modular Arithmetic\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#6-fast-powerexponentiation-by-squaring\"\u003e\u003cb\u003eGFG: Fast Power-Exponentiation by Squaring\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#7-factorial-of-a-number\"\u003e\u003cb\u003eGFG: Factorial of a number\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#8-fibonacci-number\"\u003e\u003cb\u003eGFG: Fibonacci Number\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#9-catalan-numbers\"\u003e\u003cb\u003eGFG: Catalan Numbers\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#10-euler-totient-function\"\u003e\u003cb\u003eGFG: Euler Totient Function\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#11-prime-numbers-primality-tests\"\u003e\u003cb\u003eGFG: Prime numbers \u0026 Primality Tests\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#12-prime-factorization-divisors\"\u003e\u003cb\u003eGFG: Prime Factorization \u0026 Divisors\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#13-chinese-remainder-theorem\"\u003e\u003cb\u003eGFG: Chinese Remainder Theorem\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/maths-for-data-structure-and-algorithms-dsa-a-complete-guide/#practice-problems-based-on-maths-for-dsa\"\u003e\u003cb\u003eGFG: Practice Problems based on Maths for DSA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n## 3.2 Array\n\nThe array is a fundamental and crucial data structure, presenting a linear arrangement of elements. It serves as a collection of homogeneous data types, with elements allocated contiguous memory. Thanks to this contiguous allocation, accessing any array element occurs in constant time. Each array element is identified by a corresponding index number.\n\n\u003c!-- \u003cp align=\"center\"\u003e --\u003e\n   \u003c!-- \u003c/br\u003e --\u003e\n   \u003c!-- \u003cimg src=\"./assets/data_structures/array-data-structure.jpg\" alt=\"Array Data Structure\"\u003e --\u003e\n   \u003c!-- \u003cdiv align=\"center\"\u003e\u003ch6\u003e\u003ci\u003eArray Data Structure\u003c/i\u003e\u003c/h6\u003e\u003c/div\u003e --\u003e\n\u003c!-- \u003c/p\u003e --\u003e\n\nAdditional Array Topics to Explore\n\n- **Rotation of Array:** Shifting elements in a circular manner, such as right circular shift where the last element becomes the first.\n- **Rearranging an array:** Changing the initial order of elements based on specific conditions or operations.\n- **Range queries in the array:** Performing operations on a range of elements, often referred to as range queries.\n- **Multidimensional array:** Arrays with more than one dimension, commonly encountered in the form of 2-dimensional arrays, known as matrices.\n- **Kadane’s algorithm**\n- **Dutch national flag algorithm**\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Arrays\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eData Structure Tutorial: Array\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/data-structure-tutorial-array/13551\"\u003e\u003cb\u003eCodeChef\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eArrays: Lecture Notes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://runestone.academy/ns/books/published//pythonds/AlgorithmAnalysis/toctree.html\"\u003e\u003cb\u003ecs.cmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eArrays Data Structure\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/array-data-structure/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Arrays\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLittle Elephant and Candies\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/LECANDY\"\u003e\u003cb\u003eCodeChef: LECANDY\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/lecandy-editorial/275\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eChef and Notebooks\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/CNOTE\"\u003e\u003cb\u003eCodeChefL CNOTE\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/questions/65992/cnote-editorial\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eThe Minimum Number Of Moves\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/SALARY\"\u003e\u003cb\u003eCodeChef: SALARY\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/questions/5144/salary-editorial\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMutated Minions\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/CHN15A\"\u003e\u003cb\u003eCodeChef: CHN15A\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/questions/77487/chn15a-editorial\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eChef and Rainbow Array\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/RAINBOWA\"\u003e\u003cb\u003eCodeChef: RAINBOWA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/questions/107967/rainbowa-editorial\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eForgotten Language\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/FRGTNLNG\"\u003e\u003cb\u003eCodeChef: FRGTNLNG\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/questions/75211/frgtnlng-editorial\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/array/\"\u003e\u003cb\u003eLeetcode: Practice Arrays\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eInterview Level\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n## 3.3 String\n\nA string, essentially a type of array, can be seen as an array of characters. However, it possesses distinct features, such as the last character being a null character to signify the string's end. Unique operations, like concatenation merging two strings into one, further set strings apart.\n\n\u003c!-- img --\u003e\n\nAdditional String Concepts to Explore\n\n- **Subsequence and Substring:** A subsequence is derived from a string by deleting one or more elements, while a substring is a contiguous segment of the string.\n- **Reverse and Rotation in a String:** Reversing involves interchanging character positions, while rotation shifts elements circularly.\n- **Binary String:** Comprising only two types of characters.\n- **Palindrome:** A string with elements equidistant from its center being the same.\n- **Lexicographic Pattern:** A pattern based on ASCII values or in dictionary order.\n- **Pattern Searching:** Advanced topic involving searching for a given pattern within the string.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Strings\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eC++ Strings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.tutorialspoint.com/cplusplus/cpp_strings.htm\"\u003e\u003cb\u003etutorialspoint.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eJava strings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.guru99.com/java-strings.html\"\u003e\u003cb\u003eguru99.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003ePython strings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://docs.python.org/2/library/string.html\"\u003e\u003cb\u003edocs.python.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003ePython strings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.tutorialspoint.com/python/python_strings.htm\"\u003e\u003cb\u003etutorialspoint.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMany string questions\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/string-data-structure/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Strings\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCount Substrings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/JULY14/problems/CSUB\"\u003e\u003cb\u003eCodeChef: CSUB\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/csub-editorial/6299\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLapindromes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/JUNE13/problems/LAPIN\"\u003e\u003cb\u003eCodeChefL LAPIN\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/lapin-editorial/2335\"\u003e\u003cb\u003eEditorial\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/string/\"\u003e\u003cb\u003eLeetcode: Practice Strings\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eInterview Level\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n## 3.4 Stack\n\nTransitioning to more complex data structures, let's explore the Stack and Queue.\n\nA Stack is a linear data structure that adheres to a specific order for its operations. This order can be LIFO (Last In First Out) or FILO (First In Last Out).\n\n\u003c!-- img --\u003e\n\nThe complexity of the Stack as a data structure arises from its implementation, utilizing other data structures like Arrays, Linked lists, etc., chosen based on the characteristics and features specific to the Stack data structure.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Stacks\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStack Data Structure\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/stack-data-structure/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStack Data Structure\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.tutorialspoint.com/data_structures_algorithms/stack_algorithm.htm\"\u003e\u003cb\u003etutorialspoint.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStacks: Lecture Notes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.cmu.edu/~wlovas/15122-r11/lectures/10-stacks.pdf\"\u003e\u003cb\u003ecs.cmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Stacks\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eJust Next\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/JNEXT/\"\u003e\u003cb\u003espoj.com: JNEXT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTransform the Expression\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/ONP/\"\u003e\u003cb\u003espoj.com: ONP\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLargest Rectangle in a Histogram\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/HISTOGRA/\"\u003e\u003cb\u003espoj.com: HISTOGRA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCompilers and parsers\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/COMPILER\"\u003e\u003cb\u003eCodeChefL COMPILER\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/stack/\"\u003e\u003cb\u003eLeetcode: Practice Stacks\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.5 Queue\n\nSimilar to a Stack but with distinct characteristics, the Queue is another linear data structure.\n\nA Queue operates on the principle of First In First Out (FIFO) in its individual operations.\n\n\u003c!-- img --\u003e\n\nDifferent types of queues include:\n\n- **Circular Queue:** The last element is connected to the first element, forming a circular structure.\n- **Double-ended Queue (Deque):** Allows operations from both ends of the queue.\n- **Priority Queue:** Elements are arranged based on priority, with lower-priority elements dequeued after higher-priority ones.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Queues\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eArray Implementation of Queue\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/queue-set-1introduction-and-array-implementation/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStacks and Queues\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://viterbi-web.usc.edu/~adamchik/15-121/lectures/Stacks%20and%20Queues/Stacks%20and%20Queues.html\"\u003e\u003cb\u003eviterbi-web.usc.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStacks and Queues\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.cmu.edu/~rjsimmon/15122-s13/09-queuestack.pdf\"\u003e\u003cb\u003ecs.cmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Queues\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMass of Molecule\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/MMASS/\"\u003e\u003cb\u003espoj.com: MMASS\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTransform the Expression\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/ONP/\"\u003e\u003cb\u003espoj.com: ONP\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMaximum Xor Secondary\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/problemset/problem/281/D\"\u003e\u003cb\u003ecodeforces.com: 281/D\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLongest Regular Bracket Sequence\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/contest/5/problem/C\"\u003e\u003cb\u003ecodeforces.com: contest/5/problem/C\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eAlternating Current\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/contest/343/problem/B\"\u003e\u003cb\u003ecodeforces.com: contest/343/problem/B\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSeinfeld\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/ANARC09A/\"\u003e\u003cb\u003espoj.com: ANARC09A\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/queue/\"\u003e\u003cb\u003eLeetcode: Practice Queues\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.6 Searching Algorithm\n\nHaving explored linear data structures, it's time to delve into fundamental and widely used algorithms, starting with searching algorithms.\nSearching algorithms aim to locate a specific element in an array, string, linked list, or other data structures. Key searching algorithms include:\n\n\u003c!-- img --\u003e\n\n- **Linear Search:** Iteratively checks for the element from one end to the other.\n- **Binary Search:** Divides the data structure into two equal parts to locate the element.\n- **Ternary Search:** Divides the array into three parts, determining the segment to search based on partitioning values.\n\nOther notable searching algorithms include:\n\n- Jump Search\n- Interpolation Search\n- Exponential Search\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Searching\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eNaive string searching\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/searching-for-patterns-set-1-naive-pattern-searching/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDetailed Theoretical analysis\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.cmu.edu/~fp/courses/15122-f10/lectures/03-binsearch.pdf\"\u003e\u003cb\u003ecmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBinary search\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/a/binary-search\"\u003e\u003cb\u003ekhanacademy.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Searching\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSearching Algorithms\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/searching-algorithms/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGFG: Binary Search\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/binary-search\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/binary-search/\"\u003e\u003cb\u003eLeetcode: Practice Binary-Search\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.7 Sorting Algorithm\n\nAnother crucial algorithm is the sorting algorithm, frequently employed when arranging data based on specific conditions becomes necessary. Sorting algorithms are utilized to rearrange a set of homogeneous data, such as sorting an array in increasing or decreasing order.\n\nThese algorithms rearrange the elements of a given array or list according to a comparison operator. The comparison operator determines the new order of elements in the respective data structure.\n\n\u003c!-- img --\u003e\n\nWidely Used Sorting Algorithms\n\n- **Bubble Sort**\n- **Selection Sort**\n- **Insertion Sort**\n- **Quick Sort**\n- **Merge Sort**\n\nNumerous other sorting algorithms exist, each beneficial in different scenarios.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Sorting\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSorting\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.khanacademy.org/computing/computer-science/algorithms/sorting-algorithms/a/sorting\"\u003e\u003cb\u003ekhanacademy.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBUBBLE SORT\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/sorting?slide=1\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMerge sort algorithm\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=TzeBrDU-JaY\"\u003e\u003cb\u003eyoutube.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eQuick sort algorithm\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.youtube.com/watch?v=COk73cpQbFQ\"\u003e\u003cb\u003eyoutube.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCounting Sort\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/counting-sort/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Sorting\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMerge Sort\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/MRGSRT\"\u003e\u003cb\u003eCodeChef: MRGSRT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTurbo Sort\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/TSORT\"\u003e\u003cb\u003eCodeChef: TSORT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMerge Sort\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/MRGSRT\"\u003e\u003cb\u003eCodeChef: MRGSRT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/sorting/\"\u003e\u003cb\u003eLeetcode: Practice Sorting\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.8 Divide and Conquer Algorithm\n\nAn intriguing and significant algorithm to learn in your programming journey is the Divide and Conquer algorithm. True to its name, it breaks down a problem into parts, solves each subproblem, and then merges the solutions to address the original problem.\n\n\u003c!-- img --\u003e\n\nThe algorithmic paradigm of Divide and Conquer involves three key steps:\n\n1. **Divide:** Break the given problem into subproblems of the same type.\n2. **Conquer:** Recursively solve these subproblems.\n3. **Combine:** Appropriately combine the answers.\n\nThis technique is prominently featured in two sorting algorithms—Merge Sort and Quick Sort.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Divide and Conquer\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDivide-and-Conquer and Recurrences\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.cmu.edu/afs/cs/academic/class/15210-s12/www/lectures/lecture02.pdf/\"\u003e\u003cb\u003ecs.cmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDivide and Conquer\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/category/divide-and-conquer/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Divide and Conquer\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMerge Sort\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/MRGSRT\"\u003e\u003cb\u003ecodechef.com: MRGSRT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTasty Dishes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/TASTYD\"\u003e\u003cb\u003ecodechef.com: TASTYD\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRestore the Permutation\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/RESTPERM\"\u003e\u003cb\u003ecodechef.com: RESTPERM\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eA Magical Length\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/ACM14KP1\"\u003e\u003cb\u003ecodechef.com: ACM14KP1\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLargest Rectangle in a Histogram\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/HISTOGRA/\"\u003e\u003cb\u003espoj.com: HISTOGRA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCompilers and parsers\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/COMPILER\"\u003e\u003cb\u003eCodeChefL COMPILER\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/divide-and-conquer/\"\u003e\u003cb\u003eLeetcode: Practice Divide and Conquer\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.9 Linked List\n\nSimilar to the aforementioned data structures, a linked list is a linear data structure. However, unlike an array, a linked list doesn't have contiguous memory allocation. Instead, each node in the linked list is assigned to a random memory space, and the previous node maintains a pointer to this node. Direct memory access to any node is not possible, and the linked list is dynamic, allowing for size adjustments at any time.\n\n\u003c!-- img --\u003e\n\nLinked List Variations to Explore\n\n- **Singly Linked List:** Each node points only to its next node.\n- **Circular Linked List:** The last node points back to the head of the linked list.\n- **Doubly Linked List:** Each node holds two pointers—one pointing to the next node and the other to the previous node.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Linked List\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLinked List Data Structure\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/data-structures/linked-list/\"\u003e\u003cb\u003egeeksforgeeks.org   \u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Linked List\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/linked-list/\"\u003e\u003cb\u003eLeetcode: Practice Linked List\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.10 Tree Data Structure\n\nHaving covered the basics of linear data structures, let's delve into non-linear structures, starting with the Tree.\n\nThe Tree data structure resembles an inverted tree from nature, featuring a root and leaves. The root is the initial node, and the leaves are at the bottom-most level. Notably, there's only one path between any two nodes in a tree.\n\n\u003c!-- img --\u003e\n\nBased on the maximum number of children a node can have:\n\n- **Binary Tree:** Each node can have a maximum of 2 children.\n- **Ternary Tree:** Each node can have a maximum of 3 children.\n- **N-ary Tree:** A node can have at most N children.\n\nAdditional classifications based on node configuration include:\n\n- **Complete Binary Tree:** All levels are filled, except possibly for the last level, which is filled from the left as much as possible.\n- **Perfect Binary Tree:** All levels are filled.\n- **Binary Search Tree:** A special binary tree where smaller nodes are on the left, and higher value nodes are on the right.\n- **Ternary Search Tree:** Similar to a binary search tree, but with nodes having at most 3 children.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Trees\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTree Data Structure\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/tree-data-structure/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eHeaps (priority queue)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/binary-heap/\"\u003e\u003cb\u003eviterbi-web.usc.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eHeaps\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/heap?slide=1\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003ePriority Queues: Lecture Notes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.cmu.edu/~wlovas/15122-r11/lectures/15-priorqs.pdf\"\u003e\u003cb\u003ecs.cmu.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eUNION-FIND DISJOINT SETS (UFDS)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/ufds\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDISJOINT-SET DATA STRUCTURES\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/Disjoint-set%20Data%20Structures\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDisjoint set (Union-Find): Lecture Notes\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://people.cs.georgetown.edu/jthaler/ANLY550/lec6.pdf\"\u003e\u003cb\u003eharvard.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSegment Trees: MIN SEGMENT TREE\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/segmenttree?slide=1\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRANGE MINIMUM QUERY AND LOWEST COMMON ANCESTOR\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/Range%20Minimum%20Query%20and%20Lowest%20Common%20Ancestor\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSegment Trees\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/segment-tree.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBINARY INDEXED TREES: TopCoder\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/Binary%20Indexed%20Trees\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBinary Index Tree (Fenwick tree)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/fenwicktree?slide=1\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBinary Index Tree: ICO\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/binary-index-tree.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTrees (traversals)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://people.eecs.berkeley.edu/~vazirani/s99cs170/notes/dynamic2.pdf\"\u003e\u003cb\u003eberkeley.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDynamic programming on trees\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/dp-trees.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Trees\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/tree/\"\u003e\u003cb\u003eLeetcode: Practice Trees\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/heap-priority-queue/\"\u003e\u003cb\u003eLeetcode: Practice Heap (Priority Queue)\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/union-find/\"\u003e\u003cb\u003eLeetcode: Practice Segment Tree\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/segment-tree/\"\u003e\u003cb\u003eLeetcode: Practice Union Find\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/binary-indexed-tree/\"\u003e\u003cb\u003eLeetcode: Practice Binary Indexed Tree\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/depth-first-search/\"\u003e\u003cb\u003eLeetcode: Practice Depth-First Search\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/breadth-first-search/\"\u003e\u003cb\u003eLeetcode: Practice Breadth-First Search\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/binary-search-tree/\"\u003e\u003cb\u003eLeetcode: Practice Binary Search Tree\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/trie/\"\u003e\u003cb\u003eLeetcode: Practice Trie\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.11 Graph Data Structure\n\nMoving on to another crucial non-linear structure, let's explore the Graph. Unlike the Tree, a Graph lacks a specific root or leaf node and allows traversal in any order.\n\nA Graph is a non-linear structure composed of a finite set of vertices (or nodes) and a set of edges connecting pairs of nodes. It proves invaluable in solving various real-life problems. Graphs can take different forms based on edge orientation and node characteristics.\n\n\u003c!-- img --\u003e\n\nKey concepts to explore:\n\n- **Types of Graphs:** Varying types based on connectivity or weights of nodes.\n- **Introduction to BFS and DFS:** Algorithms for traversing through a graph.\n- **Cycles in a Graph:** Series of connections leading to a loop.\n- **Topological Sorting in the Graph**\n- **Minimum Spanning Tree in Graph**\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Graphs\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGraph Data Structure And Algorithms\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDepth First Search or DFS for a Graph\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGRAPH TRAVERSAL (DFS/BFS)\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/dfsbfs\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDijkstra’s shortest path algorithm\u003ch/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-path-algorithm/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSINGLE-SOURCE SHORTEST PATHS\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://visualgo.net/en/sssp\"\u003e\u003cb\u003evisualgo.net\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBellman Ford Algorithm\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"http://www.geeksforgeeks.org/dynamic-programming-set-23-bellman-ford-algorithm/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eOne Source Shortest Path\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://compprog.wordpress.com/2007/11/29/one-source-shortest-path-the-bellman-ford-algorithm/\"\u003e\u003cb\u003ecompprog.wordpress.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMinimum spanning tree\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.cs.princeton.edu/courses/archive/fall19/cos226/lectures/43MinimumSpanningTrees.pdf\"\u003e\u003cb\u003ecs.princeton.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eArticulation points\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/articulation-points.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStrongly connected components\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/scc.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTopological Sorting\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/topological-sorting/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eEuler Paths and Euler Circuits\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://jlmartin.ku.edu/~jlmartin/courses/math105-F11/Lectures/chapter5-part2.pdf\"\u003e\u003cb\u003ejlmartin.ku.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eFast Modulo Multiplication\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/a-tutorial-on-fast-modulo-multiplication-exponential-squaring/2899\"\u003e\u003cb\u003ecodechef.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eAlgos for Calculating nCr % M\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discuss.codechef.com/t/best-known-algos-for-calculating-ncr-m/896\"\u003e\u003cb\u003ecodechef.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Graphs\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTwo Closest\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/PAIRCLST\"\u003e\u003cb\u003ecodechef.com: PAIRCLST\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSpecial Shortest Walk\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/SPSHORT\"\u003e\u003cb\u003ecodechef.com: SPSHORT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRobot Control\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/problemset/problem/346/D\"\u003e\u003cb\u003ecodeforces.com: 346/D\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eArbitrage\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/ARBITRAG/\"\u003e\u003cb\u003espoj.com: ARBITRAG\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCost\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/HIGHWAYS/\"\u003e\u003cb\u003espoj.com: HIGHWAYS\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003ePolice Query\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/POLQUERY/\"\u003e\u003cb\u003espoj.com: POLQUERY\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eVisiting Friends\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/MCO16405/\"\u003e\u003cb\u003ecodechef.com: MCO16405\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eChef and Roads\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/CL16BF/\"\u003e\u003cb\u003ecodechef.com: CL16BF\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eCodechef Password Recovery\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/CHEFPASS/\"\u003e\u003cb\u003ecodechef.com: CHEFPASS\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTanya and Password\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/contest/508/problem/D\"\u003e\u003cb\u003ecodeforces.com: contest/508/problem/D\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eOne-Way Reform\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/contest/723/problem/E\"\u003e\u003cb\u003ecodeforces.com: contest/723/problem/E\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eProblem Statement for NetworkSecurity\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://community.topcoder.com/stat?c=problem_statement\u0026pm=10736\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/graph/\"\u003e\u003cb\u003eLeetcode: Practice Graphs\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.12 Recursion\n\nRecursion stands out as a vital algorithm leveraging the concept of code reusability and repeated code usage. Its significance extends to being the foundation for many other algorithms, including:\n\n\u003c!-- img --\u003e\n\n- Tree Traversals\n- Graph Traversals\n- Divide and Conquer Algorithms\n- Backtracking Algorithms\n\nTo explore Recursion thoroughly, refer to the following articles/links:\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Recursion\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eAN INTRODUCTION TO RECURSION PART ONE\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/An%20Introduction%20to%20Recursion%20Part%20One\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eAN INTRODUCTION TO RECURSION PART TWO\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/An%20Introduction%20to%20Recursion%20Part%20Two\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eIntroduction to Recursion\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/introduction-to-recursion-data-structure-and-algorithm-tutorials/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking, Memoization \u0026 Dynamic Programming!\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://loveforprogramming.quora.com/Backtracking-Memoization-Dynamic-Programming\"\u003e\u003cb\u003eloveforprogramming.quora.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRecursion Interview Questions \u0026 Tips\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://interviewing.io/recursion-interview-questions\"\u003e\u003cb\u003einterviewing.io\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Recursion\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eConnecting Soldiers\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/NOKIA\"\u003e\u003cb\u003ecodechef.com: NOKIA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eFit Squares in Triangle\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/TRISQ\"\u003e\u003cb\u003ecodechef.com: TRISQ\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/recursion/\"\u003e\u003cb\u003eLeetcode: Practice Recursion\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n## 3.13 Backtracking Algorithm\n\nDerived from Recursion, the Backtracking algorithm allows for retracing if a recursive solution fails, exploring alternative solutions. It systematically tries out all possible solutions to find the correct one.\n\nBacktracking is an algorithmic technique that incrementally builds a solution, removing failed solutions that don't meet problem constraints.\n\n\u003c!-- img --\u003e\n\nKey problems to tackle in Backtracking algorithms:\n\n- **Knight’s Tour Problem**\n- **Rat in a Maze**\n- **N-Queen Problem**\n- **Subset Sum Problem**\n- **M-Coloring Problem**\n- **Hamiltonian Cycle**\n- **Sudoku**\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Backtracking\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking Algorithms\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/backtracking-algorithms/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRecursion and Backtracking\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/118843\"\u003e\u003cb\u003ecodeforces.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking:the essential part of dynamic programming\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/102888\"\u003e\u003cb\u003ecodeforces.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking, Memoization \u0026 Dynamic Programming!\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://loveforprogramming.quora.com/Backtracking-Memoization-Dynamic-Programming\"\u003e\u003cb\u003eloveforprogramming.quora.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking Archives\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/category/dsa/algorithm/backtracking/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Backtracking\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/backtracking/\"\u003e\u003cb\u003eLeetcode: Practice Backtracking\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.14 Dynamic Programming\n\nDynamic Programming stands as a crucial algorithm, serving as an optimization over plain recursion. It becomes particularly valuable when a recursive solution involves repeated calls for the same inputs, allowing for optimization.\n\n\u003c!-- img --\u003e\n\n\u003e Those who cannot remember the past are condemned to repeat it.\n\u003e \u003c/br\u003e \u003cdiv align=\"right\"\u003e- \u003ci\u003eDynamic Programming\u003c/i\u003e\u003cdiv\u003e\n\nKey concepts to explore in Dynamic Programming:\n\n- **Tabulation vs Memoization**\n- **Optimal Substructure Property**\n- **Overlapping Subproblems Property**\n- **Bitmasking and Dynamic Programming**\n- **Bitmasking and Dynamic Programming**\n- **Digit DP**\n\n### Basic DP\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Basic Dynamic Programming\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDemystifying Dynamic Programming\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.freecodecamp.org/news/demystifying-dynamic-programming-3efafb8d4296\"\u003e\u003cb\u003efreecodecamp.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDP Tutorial and Problem List\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/67679\"\u003e\u003cb\u003ecodeforces.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDYNAMIC PROGRAMMING: FROM NOVICE TO ADVANCED\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/Dynamic%20Programming:%20From%20Novice%20to%20Advanced\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDynamic Programming\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/dynamic-programming/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBacktracking, Memoization \u0026 Dynamic Programming!\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://loveforprogramming.quora.com/Backtracking-Memoization-Dynamic-Programming\"\u003e\u003cb\u003eloveforprogramming.quora.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Basic Dynamic Programming\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eAlternating subarray prefix\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/ALTARAY\"\u003e\u003cb\u003ecodechef.com: ALTARAY\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eSubtraction Game 2\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/AMSGAME2\"\u003e\u003cb\u003ecodechef.com: AMSGAME2\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStriver DP Series\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://takeuforward.org/dynamic-programming/striver-dp-series-dynamic-programming-problems/\"\u003e\u003cb\u003etakeuforward.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/dynamic-programming/\"\u003e\u003cb\u003eLeetcode: Practice Dynamic Programming\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n### Advanced DP\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Adv Dynamic Programming\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDynamic Programming over Subsets and Paths\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/337\"\u003e\u003cb\u003ecodeforces.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Adv Dynamic Programming\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eHistogram\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/HIST2/\"\u003e\u003cb\u003espoj.com: HIST2\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLazy Cows\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/LAZYCOWS/\"\u003e\u003cb\u003espoj.com: LAZYCOWS\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eTraveling by Stagecoach\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/TRSTAGE/\"\u003e\u003cb\u003espoj.com: TRSTAGE\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eRent your airplane and make money\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/RENT/\"\u003e\u003cb\u003espoj.com: RENT\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eIncreasing Subsequences\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/INCSEQ/\"\u003e\u003cb\u003espoj.com: INCSEQ\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDistinct Increasing Subsequences\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/INCDSEQ/\"\u003e\u003cb\u003espoj.com: INCDSEQ\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eDynamic Programming Type\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/325\"\u003e\u003cb\u003ecodechef.com: problem list\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eStriver DP Series\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://takeuforward.org/dynamic-programming/striver-dp-series-dynamic-programming-problems/\"\u003e\u003cb\u003etakeuforward.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/dynamic-programming/\"\u003e\u003cb\u003eLeetcode: Practice Dynamic Programming\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.15 Greedy Methodology\n\nAs the name implies, the Greedy methodology constructs the solution incrementally, selecting the next piece that provides the most immediate benefit — the locally optimal choice leading to global solutions.\n\nWell-suited for problems where choosing locally optimal options also results in global optimality. For instance, the Fractional Knapsack Problem employs a local optimal strategy of choosing items with the maximum value-to-weight ratio, leading to a globally optimal solution as fractions are allowed.\n\n\u003c!-- img --\u003e\n\nTo delve into the Greedy algorithm, explore these sub-topics:\n\n- **Standard Greedy Algorithms**\n- **Greedy Algorithms in Graphs**\n- **Greedy Algorithms in Operating Systems**\n- **Greedy Algorithms in Arrays**\n- **Approximate Greedy Algorithms for NP-complete Problems**\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Greedy\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGreedy Algorithms\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/greedy-algorithms/\"\u003e\u003cb\u003egeeksforgeeks.org\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGreedy Algorithms\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.iarcs.org.in/inoi/online-study-material/topics/greedy.php\"\u003e\u003cb\u003eiarcs.org.in\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGREEDY IS GOOD\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.topcoder.com/thrive/articles/Greedy%20is%20Good\"\u003e\u003cb\u003etopcoder.com\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eGREEDY IS GOOD\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://jeffe.cs.illinois.edu/teaching/algorithms/book/04-greedy.pdf\"\u003e\u003cb\u003ejeffe.cs.illinois.edu\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Greedy\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eBiased Standings\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/BAISED/\"\u003e\u003cb\u003espoj.com: BAISED\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLoad Balancing\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.spoj.com/problems/BALIFE/\"\u003e\u003cb\u003espoj.com: BALIFE\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eMany Chefs\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.codechef.com/problems/MANYCHEF\"\u003e\u003cb\u003ecodechef.com: MANYCHEF\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cp\u003e◌ \u003cb\u003eLeetcode: Interview Practice\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/greedy/\"\u003e\u003cb\u003eLeetcode: Practice Greedy\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 3.16 Mathematics Advanced\n\n### Advance Mathematics in DSA\n\n- Fundamental for evaluating algorithm effectiveness.\n- Essential for problems with mathematical characteristics.\n- Crucial for mastering Data Structures and Algorithms.\n\n\u003e Mathematical algorithm can be defined as an algorithm or procedure which is utilized to solve a mathematical problem, or mathematical problem which can be solved using DSA.\n\u003c!-- \u003e \u003c/br\u003e \u003cdiv align=\"right\"\u003e- \u003ci\u003eDynamic Programming\u003c/i\u003e\u003cdiv\u003e --\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eResources: Mathematics\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://www.geeksforgeeks.org/mathematical-algorithms/\"\u003e\u003cb\u003eGFG: Mathematical Algorithms for DSA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://codeforces.com/blog/entry/91363\"\u003e\u003cb\u003eCodeforces: Mathematical Blogs on DSA\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003ePractice Problems: Mathematics\u003c/b\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctbody\u003e\n   \u003ctr\u003e\n      \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://leetcode.com/tag/math/\"\u003e\u003cb\u003eLeetcode: Practice Math\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n[**Back To Top ⬆️**](#index)\n\n## 4. Practice Consistently and Extensively\n\nHaving covered the basics of major data structures and algorithms, it's time to put your knowledge into practice.\n\n\u003e\"Practice makes a man perfect.\"\n\nFor learning DSA, consistent and extensive practice is key. Whether considered a separate step or an integral part of the learning process, dedicating time to solving problems and implementing algorithms is essential for mastery.\n\n\n## 5. Compete to Advance and Become Proficient\n\nExplore and enhance your coding skills on various practicing platforms. Compete, solve challenges, and advance your proficiency on platforms like:\n\n1. [**LeetCode**](https://leetcode.com/)\n2. [**Codeforces**](https://codeforces.com/)\n3. [**HackerRank**](https://www.hackerrank.com/)\n4. [**CodeChef**](https://www.codechef.com/)\n5. [**TopCoder**](https://www.topcoder.com/)\n6. [**AtCoder**](https://atcoder.jp/)\n7. [**GeeksforGeeks**](https://www.geeksforgeeks.org/)\n8. [**InterviewBit**](https://www.interviewbit.com/)\n9. [**Exercism**](https://exercism.io/)\n10. [**Project Euler**](https://projecteuler.net/)\n\nCompeting on these platforms will help you apply your knowledge, face diverse challenges, and continuously improve your problem-solving skills.\n\n## Tips to Boost Your Learning\n\nThroughout the roadmap to learn DSA, consider the following tips to enhance your learning experience:\n\n1. **Master the Fundamentals:** Thoroughly understand the fundamentals of your chosen programming language, including basic syntax, data types, operators, variables, functions, conditional statements, loops, and Object-Oriented Programming (OOP).\n2. **Implement Concepts Practically:** Implement each small concept actively. Practice coding to reinforce your understanding of basic programming constructs.\n3. **Grasp Complexity Analysis:** Learn how to analyze the complexity of algorithms. Solve multiple questions to practice calculating complexities. Utilize quizzes on Algorithm Analysis for additional practice.\n4. **Focus on Logic Building:** Strengthen your logical thinking by solving problems from scratch without referring to solutions or editorials. The more problems you solve independently, the more robust your logic-building skills become.\n5. **Overcome Challenges:** Accept that challenges and roadblocks are part of the learning journey. If you're stuck on a problem or topic, read hints and approaches, and try to solve it independently. If needed, refer to the logic and code it yourself. If facing repeated challenges, consider revisiting the related concepts.\n\nRemember, learning DSA is a continuous process, and persistence and problem-solving skills play crucial roles in your success.\n\n## DSA Practice Sheets\n\n### 1. **Striver’s SDE Sheet — Top Coding Interview Problems**\n\n- [**Striver: Website Link**](https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/)\n- Creator: Raj Vikramaditya (Striver)\n- A compilation of essential coding interview questions in Data Structures \u0026 Algorithms. Commonly asked in interviews at prominent companies like Google, Amazon, and Facebook.\n\n### 2. **DSA Sheet by Love Babbar**\n\n- [**Love Babbar: Website Link**](https://www.geeksforgeeks.org/dsa-sheet-by-love-babbar/)\n- Creator: Love Babbar\n- A comprehensive list of 450 coding questions by a former Amazon Software Engineer. These questions help in understanding Data Structures \u0026 Algorithms and are frequently asked in interviews at companies like Amazon, Microsoft, and Google.\n\n### 3. **Apna College DSA Sheet**\n\n- [**Apna College: Google Sheet Link**](https://docs.google.com/spreadsheets/d/1hXserPuxVoWMG9Hs7y8wVdRCJTcj3xMBAEYUOXQ5Xag)\n- Creators: Shradha Didi and Aman Bhaiya\n- A valuable resource with around 400 problems categorized by topic, along with information about companies that have posed these problems.\n\n### 4. **NeetCode 150**\n\n- [**NeetCode: Website Link**](https://neetcode.io/practice)\n- Curated by a Google engineer\n- A collection of 150 LeetCode.com questions covering important topics for interviews at FAANG and other big tech companies.\n\n### 5. **DSA Sheet by Arsh 60 Days Plan**\n\n- [**Arsh: Google Sheet Link**](https://docs.google.com/spreadsheets/d/1MGVBJ8HkRbCnU6EQASjJKCqQE8BWng4qgL0n3vCVOxE)\n- Creator: Arsh Goyal\n- A DSA plan with coding problems designed to prepare for interviews in 45–60 days. Arsh has a background in Samsung, CodeChef, and ISRO.\n\n### 6. **AlgoPrep’s 151 Problems Sheet**\n\n- [**AlgoPrep: Google Sheet Link**](https://docs.google.com/spreadsheets/d/1kyHfGGaLTzWspcqMUUS5Httmip7t8LJB0P-uPrRLGos)\n- Compiled by Nishant Bhaiya from AlgoPrep\n- A broad range of coding problems and solutions related to data structures and algorithms, aimed at assisting software development engineers in interview preparation for top tech firms.\n\n[**Back To Top ⬆️**](#index)\n\n---\n\n## Upcoming Additions\n\nStay tuned for additional resources and guides tailored for specific programming languages:\n\n### JavaScript - Data Structures and Algorithms\n\n**DSA in JavaScript**: [*Learn DSA in JavaScript*](./JavaScript/)\n\n### C/C++ - Data Structures and Algorithms\n\n**DSA in C++**: [*Learn DSA in C++*](./C++/)\n\n### Python - Data Structures and Algorithms\n\n### Java - Data Structures and Algorithms\n\n\u003cdiv align=\"center\"\u003e\n\n---\n\n   *Authored by \u003ca target=\"_blank\" href=\"https://github.com/gautamankoji\"\u003eGautam Ankoji\u003c/a\u003e*\n   \n   \u003cp align=\"center\"\u003e\n     Copyright © 2023 - 2024 \u003cb\u003e\u003ca target=\"_blank\" href=\"https://github.com/SERVER-X-101\"\u003eSERVER-X-101\u003c/a\u003e\u003c/b\u003e All rights reserved. \u003cbr/\u003e\n   \u003c/p\u003e\n\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverx-org%2Fdsa-mastery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverx-org%2Fdsa-mastery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverx-org%2Fdsa-mastery/lists"}