HOW TO CALCULATE TIME COMPLEXITY WITH EXAMPLES (Part-1) || FINDING TIME COMPLEXITY || DAA

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

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

  • @ChaitanyaKumar-r7j
    @ChaitanyaKumar-r7j 3 месяца назад +3

    Respected Sir, in this video at around 12.48 point, you have said that the loop gets executed for (n+1) times and then again at 13.53 point you have taken similar loop but saying it gets executed n times. How can both be different sir?

  • @tejasreebole9427
    @tejasreebole9427 2 месяца назад +1

    Sir in some examples you are taking n+1,and in others n for the same loop,how will it differ??? Are u just avoiding the constants????

  • @aryakumar727
    @aryakumar727 Месяц назад

    thnkq so much sir i have watched too many videos but cant understand this logarithmic part u have clear explanation finally i understood

  • @sidd77_
    @sidd77_ 8 месяцев назад

    Thank you for making these videos sir, very helpful!

  • @manishareddy627
    @manishareddy627 9 месяцев назад

    Hello sir
    I have watched all your videos on DBMS and SQL.. I really found it useful!! Would it be possible for you to share any PDF on SQL?

  • @Tkklak
    @Tkklak 7 месяцев назад

    Excellent explanation, thank you

  • @lhtcboss2002
    @lhtcboss2002 4 месяца назад

    Excellent ,this is quite clear thank you so much Sir

  • @tejasreebole9427
    @tejasreebole9427 2 месяца назад

    In the last example the print statement is inside the loop so it will be executed for n times ,even though the time complexity is 0(n) we get the equation as 2n+3

    • @myrealm7115
      @myrealm7115 2 месяца назад

      hey could you explain what did he tell at 9:34 by showing other time complexities ?

  • @sahanakgowda2684
    @sahanakgowda2684 5 месяцев назад +1

    in the last example ,,why didn't u avoided constant in n+1 sir

    • @infuze6647
      @infuze6647 4 месяца назад

      Because when writing it in terms of big O, we get rid of any constants, so the +1 will be removed and we only write O(n)

  • @Rakshithaailla-f7h
    @Rakshithaailla-f7h 8 месяцев назад

    Thank you sir🎉

  • @carromplayer4357
    @carromplayer4357 Месяц назад

    Thank you sir... ❤

  • @patrickemerysevor7410
    @patrickemerysevor7410 9 месяцев назад

    Mr. Saradhi please can you me with this: perform a theoritical analysis on the algorithm below and state the complexity functionand asymtotic compleity
    #include
    void swap(int &a, int &b){
    int temp = a;
    a = b:
    b = temp;
    }
    void Sort(int arr[], int n){
    for (int i = 0; i < n - i - 1; ++j){
    for (int j = 0; j < n - i - 1; ++j){
    // compare adjacent elementa
    if (arr[j] > arr[j + 1]){
    // Swap if they are in the wrong order
    swap(arr[j] > arr[j + 1]);
    }
    }
    }
    void printArray(int arr[], int size){
    for (int i = 0; i < size; i ++){
    std:: cout

  • @killerkisser9130
    @killerkisser9130 Месяц назад

    Thanks you sir

  • @lokeshpallapu101
    @lokeshpallapu101 5 месяцев назад

    Good explanation sir

  • @Srikanth11-bh2zx
    @Srikanth11-bh2zx 4 месяца назад

    Thank you 👍

  • @sampathm4253
    @sampathm4253 2 месяца назад

    thank u sir

  • @raistar72
    @raistar72 9 месяцев назад

    Deep learning technique subject playlist plz

  • @faizanmaalik9715
    @faizanmaalik9715 9 месяцев назад

  • @vlogwithvivek8207
    @vlogwithvivek8207 4 месяца назад

    sir i run 0 to n then time complexity come O(n) if we want to run i 0 to 5 then what will be the time complexity