Create a Singly Linked List from an array
Suppose we have an int array and we want to create it into a singly linked list from it.
Suppose we have an int array and we want to create it into a singly linked list from it.
Main advantage of shared_ptr is that it automatically releases the associated memory when not used any more.
We should create shared_ptr objects carefully. Checkout below two cases,
In this article we will compare C++11 Smart Pointer Implementation shared_ptr and a normal pointer.
In this article we will discuss how to use custom deleter with std::shared_ptr.
In this article we will discuss a smart pointer implementation provide by c++11 i.e. shared_ptr.
Many times we need to perform certain tasks and also group them.
Many times we need to search for some specific paths in a binary tree from top to bottom. Lets design a code to find out all paths in a binary tee.
Change the left and right pointers of each node in Binary search Tree to make it a sorted doubly linked list.