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?
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
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
thnkq so much sir i have watched too many videos but cant understand this logarithmic part u have clear explanation finally i understood
Excellent explanation, thank you
Thank you for making these videos sir, very helpful!
great explanation sir!
Excellent ,this is quite clear thank you so much Sir
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?
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?
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
hey could you explain what did he tell at 9:34 by showing other time complexities ?
Thank you sir🎉
Thank you sir... ❤
Thank you 👍
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????
Good explanation sir
Thanks you sir
thank u sir
Deep learning technique subject playlist plz
in the last example ,,why didn't u avoided constant in n+1 sir
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)
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
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