#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 moreQ1 Which one of the following is a top-down parser? [A] Recursive descent parser [B] Operator precedence parser [C] An LR(k) parser [D] An LALR(k) p…
Read moreQ1 The Floyd-Warshall algorithm for all-pair shortest paths computation is based on [A] Greedy paradigm [B] Divide-and-Conquer paradigm [C] Dynamic …
Read moreQ1 Suppose, a circular queue of capacity (n–1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation…
Read moreQ1 The binary equivalent of (1011·011)10 is equal to [A] 11·375 [B] 10·123 [C] 11·175 [D] 9·234 Solution 1*2^3+0*2^2+1*2^1+1*2^0 =8+2+1=11 0*1/2+1*1…
Read moreProgram def fc(num): bina=bin(num)[2:] complement='' for b in bina: if b=='1': complement+='0…
Read moreProgram arr=eval(input("enter list element")) a=arr[0] b=arr[1] for i in range(0,len(arr)): for j in range(i+1,len(arr)): if …
Read morel=["cat","dog","doll","rat"] prefix="do" output=[] for word in l: if prefix==word[0:len(prefix…
Read moreIf two prime difference is 2 then number is called twin prime number. So to check number is twin prime or not First check number is prime or not. Se…
Read moreProgram to repeat name without using for loop is possible using self recursive function calling condition is set inside the function .function is cal…
Read morePositive integer that is equal to sum of its positive divisor excluding the number itself. Program n=int(input("enter number")) sum=0 for…
Read moreNumber of n digits which are equal to sum of nth power of digit. Program for i in range(1,1000): num=i n=len(str(i)) sum1=0 i=str(i)…
Read moreDifference1 List: List is comma seperated value in square bracket and bracket is mandatory. L=[1,2,3] Tuple: Tuple is comma seperated value in paren…
Read moreIn this turing machine number of a that equal to the number of b and c .pda cannot do this because in pda only one comparision is possible using st…
Read more<html> <head> var pic=new Array("b.jpg","c.jpg","d.jpg"); function aa() { var rn=Math.floor(Math.random()*…
Read moreCopyright (c) 2021 NS All Right Reseved
Social Plugin