Sudhir sharma has Published 1206 Articles

Print distinct sorted permutations with duplicates allowed in input in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 07:24:47

543 Views

In this programming problem, we are given a string and we have to print the distinct sorted permutations of the string elements that can be formed. The condition with this problem is that the string may contain a character that will arise more than one time. Also, the given string ... Read More

C Program for Activity Selection Problem

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 07:08:44

4K+ Views

The activity selection problem is a problem in which we are given a set of activities with their starting and finishing times. And we need to find all those activities that a person can do performing the single activity at a time.The greedy algorithm is appointed in this problem to ... Read More

C / C++ Program for Subset Sum (Backtracking)

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 07:05:07

10K+ Views

Backtracking is a technique to solve dynamic programming problems. It works by going step by step and rejects those paths that do not lead to a solution and trackback (moves back ) to the previous position.In the subset sum problem, we have to find the subset of a set is ... Read More

Binomial Random Variables in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 07:01:33

351 Views

Random variables are those variables that are an outcome of the outcomes of a process that has the probability of giving rise to multiple outcomes. For example, The variable denoting head or tail as an outcome on tossing a coin is a random variable.A binomial random variable is a special ... Read More

Binary Tree with Array implementation in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:40:01

4K+ Views

A binary tree is a special type of tree in which each node of the tree can have at most two child nodes. These child nodes are known as right child and left child.A simple binary tree is −For representing trees, there are two ways, dynamic node representation which uses ... Read More

Binary Search Tree - Delete Operation in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:37:30

4K+ Views

Binary search tree (BST) is a special type of tree which follows the following rules −left child node’s value is always less than the parent Noteright child node has a greater value than the parent node.all the nodes individually form a binary search tree.Example of a binary search tree (BST) ... Read More

Binary Search Tree - Search and Insertion Operations in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:31:08

1K+ Views

Binary search tree (BST) is a special type of tree which follows the following rules −left child node’s value is always less than the parent Noteright child node has a greater value than the parent node.all the nodes individually form a binary search tree.Example of a binary search tree (BST) ... Read More

Binary Search on Singly Linked List in C++

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:25:18

1K+ Views

A singly linked list is a linked list (a data structure that stores a node’s value and the memory location of the next node) which can go only one way.A binary search is a search algorithm based on divide and rule. That finds the middle element of the structure and ... Read More

Binary Search in C++ Standard Template Library (STL)

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:21:12

152 Views

A binary search known as logarithmic search is a search algorithm that searches for an element in a sorted array. The algorithm recursively divides the array into two halves, if the element is found at the mid position then return otherwise call the divide and check again until the element ... Read More

Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)

sudhir sharma

sudhir sharma

Updated on 03-Jan-2020 06:17:40

4K+ Views

Binary search is a search algorithm that searches for an element by comparing it with the middle value of the array and dividing it based on the value. The algorithm does this repeatedly until the element is found.The array should be sorted in order to apply a binary search to ... Read More

Advertisements