Sudhir sharma has Published 1082 Articles

C Program for Activity Selection Problem

sudhir sharma

sudhir sharma

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

6K+ 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

12K+ 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

487 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

5K+ 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

5K+ 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 in C++ Standard Template Library (STL)

sudhir sharma

sudhir sharma

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

310 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

C Program for Rabin-Karp Algorithm for Pattern Searching

sudhir sharma

sudhir sharma

Updated on 24-Dec-2019 06:26:19

3K+ Views

Pattern matching in C − We have to find if a string is present in another string, as an example, the string "algorithm” is present within the string "naive algorithm". If it is found, then its location (i.e. position it is present at) is displayed. We tend to create a function ... Read More

C Program for Naive algorithm for Pattern Searching

sudhir sharma

sudhir sharma

Updated on 24-Dec-2019 06:18:02

8K+ Views

Pattern matching in C− We have to find if a string is present in another string, as an example, the string "algorithm” is present within the string "naive algorithm". If it is found, then its location (i.e. position it is present at) is displayed. We tend to create a function ... Read More

C Program for Minimum number of jumps to reach the end

sudhir sharma

sudhir sharma

Updated on 24-Dec-2019 06:12:27

688 Views

We are given, an array of non-negative integers denoting the maximum number of steps that can be made forward from that element. The pointer is initially positioned at the first index [0 index] of the array. Your goal is to reach the last index of the array in the minimum ... Read More

C Program for Minimum Cost Path

sudhir sharma

sudhir sharma

Updated on 24-Dec-2019 06:06:27

963 Views

Here, we will solve the minimum cost path problem in C. The implication is done on a 2D-matrix where each cell has a cost to travel. We have to find a path from the left top corner to the bottom right corner with minimum travel cost. You can only traverse ... Read More

Advertisements