Sudhir sharma has Published 1206 Articles

C Program for Matrix Chain Multiplication

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:57:47

10K+ Views

In this problem, we are given a sequence( array) of metrics. our task is to create a C program for Matrix chain multiplication. We need to find a way to multiply these matrixes so that, the minimum number of multiplications is required.The array of matrices will contain n elements, which ... Read More

C program to demonstrate fork() and pipe()

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:49:55

2K+ Views

In this problem, we will demonstrate fork() and pipe(). Here we will create a C program for Linux that will concatenate two string, using 2 processes one will take input and send it to others which will concatenate the string with a predefined string and return the concatenated string.First lets ... Read More

C Program for Reverse a linked list

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:44:11

11K+ Views

In this problem, we are given a linked list. Our task is to create a program for reverse a linked list.The program will reverse the given linked list and return the reversed linked list.Linked List is a sequence of links with contains items. Each link contains a connection to another ... Read More

C Program for Recursive Insertion Sort

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:38:47

3K+ Views

Insertion sort is a sorting algorithm which is an in-place comparison-based algorithm.The algorithm works by place element in their position in the sorted sub-array i.e. the sub-array preceding the element which is a sorted sub-array.AlgorithmStep1 − loop from 1 to n-1 and do −Step2.1 − select element at position i, ... Read More

Program for Rabin-Karp Algorithm for Pattern Searching in C

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:36:21

280 Views

In this problem, we are given two strings a text and a pattern. Our task is to create a program for Rabin-Karp algorithm for pattern search, it will find all the occurrences of pattern in text string.Here, we have to find all the occurrences of the pattern in the text.Let’s ... Read More

C Program for KMP Algorithm for Pattern Searching

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:32:15

8K+ Views

In this problem, we are given two strings a text and a pattern. Our task is to create a program for KMP algorithm for pattern search, it will find all the occurrences of pattern in text string.Here, we have to find all the occurrences of patterns in the text.Let’s take ... Read More

C Program for Iterative Merge Sort

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:27:30

1K+ Views

Merge sort what is a sorting algorithm based on the divide and conquer technique. the time complexity of merge sort is O(n log n). The algorithm first divides the array into equal halves and then merges them in a certain manner.Iterative merge sortIn iterative merge sort, we will divide the ... Read More

C Program for Anagram Substring Search

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:24:10

194 Views

In this problem, we are given two string one text of size n and other a pattern of size m. Our task is to create a program for Anagram substring search.Here, we have to find all the occurrence of pattern and all its permutations (anagrams) in the text.Let’s take an ... Read More

Binary tree to string with brackets in C++

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:21:45

367 Views

In this problem, we are given a binary tree. Our task is to create a program that will convert a binary tree to string with brackets in C++.The values of the binary tree are integers and it will be fed to the program in a preorder traversing way. The string ... Read More

Binary Indexed Tree: Range Update and Range Queries in C++

sudhir sharma

sudhir sharma

Updated on 17-Jul-2020 12:09:31

310 Views

Here, we are given an array of size n which initially has all elements 0. And there are some queries that are to be performed on it. There are two types of queries −update(l, r, value) − Add value to the elements of the array that are between index l ... Read More

Advertisements