#include <bits/stdc++.h> using namespace std; class leafN{ public: char ch; int fq; leafN(char c, int f){ ch = c; fq = f; } ~leafN(){ ...
Has anybody got pseudocode of famous algorithms (not c++ code)?
so it doesn't make sense to dynamically allocate a pointer and then assign it null right?
#include <iostream> #include <vector> using namespace std; class solution { public: vector<int> foo(vector<int> v) { vector<int> vect; //some work on vect return ...
Hello, I have installed Kali Linux on my Windows 10 PC. How to copy contents of vim file in linux to windows clipboard?
how to count the number of operations performed in any code? Like in the below code, time complexity is O(n) but wht abt the value of this term "no of operations"? class Solut...
What is the necessity of type-casting the pointer in malloc? Does Realloc copy the whole memory previously allocated using malloc into a new memory location in O(n) time compl...
When dynamic exception specifications are deprecated in C++11 what do you guys use instead of that ?
How to do this ques?
I just read free() does not erase the data in the dynamic memory. It just deallocates its pointer. Then why is it incorrectly spoken that "dynamic allocation is better than st...
There are 2 pointers head and ptr where ptr = head and head points to the linked list 7->0->8->0. I traverse the list using head and it reaches the last node with value 0. Whe...
Why giving error upon using new operator?
Which data structure takes up O(1) space complexity? I searched up but some say map of stl takes O(n) space, while other websites say it takes O(1) ....
After doing free(ptr) what does ptr point to:- null (no address now) or the previous dynamic allocated address or any random address on heap/stack?
Hey, please suggest if I should learn everything in Cpp before I begin with Leetcode and DSA?
Is there any website where I can run linux commands?
Also don't you think vector array justifies definition of dynamic array much more when compared to malloc and realloc declaration (In malloc you've to mention the size as well...
https://www.cplusplus.com/reference/map/map/operator[]/ "If the function inserts a new element, concurrently iterating ranges in the container is not safe." Can somebody com...
Can anyone tell me does storing input in any data structures requires time complexity over O(1) ? Does time complexity only make sense when operations are being performed ove...
Can somebody confirm that does Kali Linux allow color of text and username + laptop name to be different ?