Questions: 1 978

Answers by our Experts: 1 850

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a function that takes a positive integer as input and returns the leading digit in its decimal representation. For example, the leading digit of 234567 is 2.



Write a C program to print the string and its length using functions


Create a program that will take in an input integer number from the user. And will display each digit in word form. However, three digits will instead be shown as an enlarged font. 


1. Create a program that multiply,divide, and subtract two numbers.Then,make a pseudocode, algorithm and flowchart on it.

2.Temperature of a city in Fahrenheit degrees is input through the keyboard (use scanf() function in your program to ask the user to input any number or string).Write pseudocode, algorithm, flowchart,and a c program to convert that temperature into centigrade Celsius.


Write program to convert a postfix expression to infix expression with parentheses on each operation .


*in the given problem i need mainly Implement forward star graph representation*



Write a C program to compute shortest path between two given nodes for an unweighted undirected connected graph.



You should implement the following:



1. Implement forward star graph representation



2. Use bfs to compute the shortest path (you should use the forward star representation that you have implemented in the BFS)



3. Write a test function which reads number of vertices, number of edges, the sequence of edges followed by source and destination vertices from stdin.



Sample Input/Output: (for K4 - complete graph on 4 vertices, vertex index starts from 0)



Input: 4 6 0 1 0 2 0 3 1 0 1 2 1 3 2 0 2 1 2 3 3 0 3 1 3 2 0 3



Output: 1



You should print "INVALID INPUT" for all invalid input cases.

A c program to generate the below pascal triangle.




1




1 1




1 2 1




1 3 3 1




1 4 6 4 1




1 5 10 10 1





I need Linked list implementation implementation for the following problem:

Implement Disjoint Sets data structure. You should implement the data structure as a disjoint-set forests along with the heuristics union by rank and path compression.


Using the Disjoint-Set data structure implement Krushkal's Algorithm for Minimum Spanning Tree for a weighted undirected graph.


The graph will be passed through a text file as command line argument. You need to display the edges of the MST along with total weight.

For example graph will be in the following format (for K_4, complete graph on 4 vertices)

4 6

1 2 5

1 3 10

1 4 2

2 3 20

2 4 15

3 4 6


Edges of the MST {(1, 2), (1, 4), (3, 4)}, Total Weight: 13


A disjoint -set data structure maintains a collection of disjoint sets. Each set is identified by a representative.


The disjoint-set data structure has the following operations.

   MAKE-SET(x) : Create a set with single tone element x. x will be the representative of the set.

   UNION(x,y): Unite the sets containing x and y, say S_x and S_y into a new set S_x U S_y. This operation destroys S_x and S_y and adds the union.

         Representative of S_x (or S_y) will be the representative of the union.

   FIND-SET(x): Returns the representative of the set S_x.


Implement Disjoint Sets data structure. You should implement the data structure as a disjoint-set forests along with the heuristics union by rank and path compression.


Using the Disjoint-Set data structure implement Krushkal's Algorithm for Minimum Spanning Tree for a weighted undirected graph.


The graph will be passed through a text file as command line argument. You need to display the edges of the MST along with total weight.



Write a program that given an array A[ ] of n numbers and another number x, determine whether or not there exist two elements in A whose sum is exactly x


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS