Understanding the Space Complexity of an Algorithm

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 5

  • @Mohan-2034
    @Mohan-2034 Месяц назад +2

    Best teacher from somalia 🇸🇴 east Africa ❤❤❤

  • @lakmipriyanjana4098
    @lakmipriyanjana4098 Месяц назад +1

    very clear teaching style and we can emphasis it easily..thank you very much sir and keep it up more and more........

  • @eghanshith5346
    @eghanshith5346 24 дня назад

    1.Priori vs. Posterior Analysis:
    Priori analysis estimates time and memory space before executing an algorithm.
    Posterior analysis calculates these after execution.
    We focus on priori analysis for simplicity.
    2.Space Complexity Components:
    Ignore space for source code and simple variables (constants).
    Consider space for data structures used (e.g., lists).
    Not applicable here: stack space for recursive algorithms.
    3.Example Algorithm: Sum of N Elements:
    Non-recursive, iterative algorithm.
    Data structure: list with N elements.
    Space complexity: O(N) due to list size.
    Remember, space complexity matters when optimizing memory usage! 🚀

  • @MUM-l8f
    @MUM-l8f Месяц назад +1

    Sir your teaching style and content are awesome 👍❤

  • @Arhankhan0786k
    @Arhankhan0786k Месяц назад +1

    ❤❤❤ thank you Sir 😊