Dabbang Pattern in C++
In this article, we gonna tell you how to draw Dabbang Pattern in C++.
In this article, we gonna tell you how to draw Dabbang Pattern in C++.
Kruskal Algorithm in Greedy Algorithm in C/C++/Java/Python.It is an Algorithm that is used to generate a minimum spanning tree for a given graph.A Spanning tree is a subset, connected graph G, and all the edges are connected in such a way that we can traverse to any edge from a particular edge with or without intermediates. So, if there are n vertices in a connected graph then the no. of edges that a spanning tree may have is n-1.
Activity Selection Problem in Greedy Algorithm in C/C++/Java/Python.The Activity Selection problem is an approach to selecting non-conflicting tasks based on start and end time which can be solved in O(N logN) time using a simple greedy approach.
In the case of an even number of elements in the linked list, we can easily split the list into two halves.Store the mid and last pointers of the circular linked list using the tortoise and hare algorithm. Now, make the second half circular and the first half circular. Set the head (or start ) pointers of the two linked lists.
A circular linked list is a linked list where common nodes are connected to form a circle. There is no NULL at the end. In this, any node can be at the starting point. So, we can traverse from any point. We can maintain a pointer to the last inserted node and the front can…
3 JUG Problem Easy Python Code – The Three Water Jug Puzzle. These are the steps to approach this problem
Insertion sort- It places sorted elements at their suitable place in iteration. If we get a larger element then check with other elements whether it’s suitable at that place or not, the other unsorted one is kept on the right side. It is more simple and more adaptive in nature
Bubble sort- In this, sorting begins from the first element and checks the first and second elements. If the first element is greater than the second element it swaps them. This process continues until the last element.
How to swap two numbers without using a temporary variable in C/C++/Java/Python.We input two numbers and perform arithmetic operations of multiplication and division and the numbers are swapped
To find the sum of elements in a given array in C/C++/Java/Python. We create a loop for a user to enter the elements and then calculate the sum of each element using a loop. Print the elements stored in an array and the sum of each element in an array.