Anonymous
sdl is cool, if you are new into this command line games are also fun (using windows.h library on windows or your os equivalent)
Бабак
Hi guys
Anonymous
Hi
バレンタインがいない柴(食用不可)
Hi
Anonymous
How are you
Бабак
I have one question!
Anonymous
U use visual Studio code
Anonymous
Checkpm
バレンタインがいない柴(食用不可)
...
Бабак
Sorry I ask tomarow
Basel Abras
Hello everyone
What practical guide for embedded c/c++ do you recommend?
Agala
hello everyone. i am a beginner. anyone with c++ pdf to share it to me please
Typing...
Strife
if you wan learn
Strife
go youtube
Strife
best place for learn
Papilo
Wch channel be that
Jasur Fozilov 🐳
where can i practice c++ ? which is the best website to practice ?
Strife
Strife
you first make example and go solve your example in paper
Strife
by doing this you make algorithm
Strife
And you prepare your mind to write a program
Strife
I hope it helped you
Strife
https://cloudemployee.co.uk/blog/programming-tips/10-best-websites-to-practice-coding-online
Jasur Fozilov 🐳
Anonymous
Anonymous
Hi guys, please i want to ask a question, actually i want to know if it is possible to convert a .pdf file template into another different template design which also pdf file?
klimi
klimi
(at least i think... i haven't seen pdf templates... just pdf)
klimi
no idea
Yusuf
I want to work as a C++ programmer. I love back end stuff. But C++ too hard for me then I found Go. It has a similar syntax like C++, compiled and fast. Finally I have a job I love.
For someone want to work on back end side but dont have enough time to learn C++ I recommend to learn Go.
Kishore
Could anyone suggest good books for cracking interview?
Anonymous
Hey
Anonymous
hello everyone. Can anybody explain how this recursive function works, I mean piece of code inside this scopes: largest_element(arr, n-1), arr[n])
int max(int a, int b)
{
if(a>b)
return a;
return b;
}
int largest_element(int arr[], int n)
{
if(n==0)
return arr[0];
return max(largest_element(arr, n-1), arr[n]);
}
Nameful
Hey
Hey, do you prefer C or C++?
Nameful
Anonymous
yes, I just found it in the internet
Anonymous
but i can't understand
Anonymous
how we can call it with (arr, n-1)
Anonymous
what happens during calls here (arr, n-1)
Anonymous
i mean, I can`t call it like this return max(LargestElement(arr, n - 1));
So why I shoud pass here arr pointer as I understand, and arr[n] separately)
Anonymous
sorry, maybe it is stupid question, but i can`t understand this moment))
Nameful
Anonymous
max(LargestElement(arr, n - 1), arr[n]);
—— ——— —————
1 2 3
well, it isn't third parameter, but as i see, in declaration we shoud pass array and index which will be decremented, however we pass arr pointer, index, and value of element (?)
Anonymous
I am learning DSA ( struggling to learn some topics ) and trying to solve questions on codeforces and codechef.
I am not able to solve the medium and hard level questions. Can you guys tell me how should I proceed with my learning? I do not have any support from college (tier 3 ) but I have access to almost any course on the internet.
Anonymous
Please let me know if you have any suggestions. It'd be of great help.
Parth
Anonymous
Hi
Pradeep
Бабак
Бабак
Hi
If you have any questions , please ask
Pavel
Deni
labyrinth
could anyone explain the difference between writing a class in a header file AND writing class definition in header file and implementation in cpp file? in terms of preprocessing, compiling and linking
Keshav
Heyy.. can anyone send "E.balaguruswamy" dsa course pdf ??
Anshul
How is the complexity of level order traversal of binary tree using recrusion, O(n^2) and not O(2^N).
Anshul
int height(Node *root)
{
//base case
if(root==NULL)
{
return 0;
}
int ls=height(root->left);
int rs=height(root->right);
return max(ls,rs)+1;
}
void printKthLevel(Node *root,int k)
{
//base case
if(root==NULL)
{
return;
}
if(k==1)
{
cout<<root->data<<" ";
return;
}
//rec case
printKthLevel(root->left,k-1);
printKthLevel(root->right,k-1);
}
void printAllLevels(Node *root)
{
int H=height(root);
for(int i=1;i<=H;i++)
{
printKthLevel(root,i);
cout<<endl;
}
}
Anshul
in this if we use recurrence method to find the complexity of the printKthLevel() fn. then it'll give complexity as 2^k
Anshul
and as the printKthLevel is being called H no. of times so the overall complexity should 2^1+2^2+....+2^H i.e O(2^H)
Anshul
then why the complexity is O(n^2) {read it on gfg}
Anshul
Shikha
Hii
Anyone given myntra exam
klimi
Anonymous
olli
then why the complexity is O(n^2) {read it on gfg}
it depends on what you want your n to be. In the case of a full tree, the complexity is O(n^2) where n is the number of nodes and O(l ^ 2) where l is the number of levels. Now that makes perfect sense since a binary tree of height l can store n nodes.
O(n^2) is correct because no matter what the tree looks like, you need at most n steps to print a single node. And to print the whole tree you will at most repeat that step n times. (In practice even less)
However, thinking in terms of levels does not make too much sense here. if you look at the other extreme where the tree degenerates into a list, the complexity in terms of nodes is still O(n^2), but also in terms of levels because n = l which gives it a lot of variance.
We can't say O(l ^ 2) is wrong because clearly O(l^2) <= O(2^l) but this complexity class is not really helpful and depends not only on the number of levels but also on how full the tree is.
Anshul
I still can't understand why it's not O(2^l) because I learnt recurrence method to find complexity of any recursion problem. And recurrence method gives answer as O(2^l)
Anshul
In H levels in total I will have 1+2+4+...+2^(H-1) nodes. And on each node I'll make a call once. And in each call I do constant work so the complexity should be O(2^H)
Anshul
Is O(2^2n) and O(2^n) same complexities
Anonymous
Hii how are you doing?
I'm Developer I need website and android Development task(work) like your college assignment and project inbox me.
バレンタインがいない柴(食用不可)