#include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> struct Edge { // This structure is equal …
Read more# include <stdio.h> #include <stdlib.h> int i, j, k, a, b, u, v, n, ne = 1; int min, mincost = 0, cost[9][9], parent[9]; in…
Read more#include <stdio.h> // defining the number of vertices #define nV 4 #define INF 999 void printMatrix(int matrix[][nV]); // Implementing floyd w…
Read more#include <stdio.h> #include <limits.h> // Number of vertices in the graph #define V 9 // A utility function to find the vertex with mini…
Read more#include <stdio.h> #include <stdlib.h> #define MAX_VERTICES 100 // Function to add an edge to the graph void addEdge(int graph[MAX_VERTI…
Read more#include <stdio.h> int main() { int r, c, a[10][10], b[10][10], sum[10][10], i, j; printf("\nEnter elements of 1st matrix:\n"); …
Read moreFibonacci series can be find using iteration or recursion.In iteration one for loop is used so time complexity O(n).In recursion time complexity i…
Read moreProgram and time complexity of factorial using iteration and recursion in C Factorial can be calculated using iteration and recursion .In iterative m…
Read moreProgram to search element in Matrix in C To search in 2d Matrix two method one is brute force method compare with each element but time complexity in…
Read moreProgram of chocolate distribution in C In this program or problem array of chocolate given to 4 person but distributed in which gap between Max and …
Read moreProgram to find leader in an array Everything in the right should be smaller than current element.Two method are there.First method is brute force me…
Read moreProgram to find maximum product subarray in C To find maximum product subarray two method or solution are possible first is brute force method that…
Read moreProgram to find maximum sum subarray in C To find maximum sum subarray two method or solution are possible first is brute force method that complex…
Read moreProgram to find subarray from array in C For example a={1,2,3,4} Subarray of array is 1,12,123,1234,2,23,234,3,34,4 That is n(n+1)/2 4(4+1)/2=10 C…
Read moreProgram of count inversion C code Example a={9,4,5,8} Total number of inversion needed at index 0 9>4,5,8 so inversion needed=3 at index 1,2,3 n…
Read moreProgram to find common element between three sorted array in C with complexity o(n) In this program find common element between the three sorted …
Read moreProgram to find common element between three sorted array in C In this program find common element between the three sorted array using three for…
Read moreQuick sort C code Quick sort based on divide and conquer technique. That algorithm picks an element as a pivot and partitions the array. An array …
Read moreNext permutation C code If all permutations of the array are sorted in lexicographical order then next permutation of that string is the permutatio…
Read moreCopyright (c) 2021 NS All Right Reseved
Social Plugin