Answer: 3.5333 repeating
Explanation:
2 times 3/5 equals 1.2, 1.2 plus 10 equals 11.2, 11.2 divided by 3-1 equals 3.5333 repeating i think.
Answer:
- Iterate over the Bellman-Ford algorithm n-1 time while tracking the parent vertex and store in an array.
- Do another iteration and if no relaxation of the edges occurs in the nth iteration then print of return "There are no negative cycle".
- Else, store the vertex of the relaxed edge at the nth iteration with a variable name.
- Then iterate over the vertexes starting from the store vertex until a cycle is found then print it out as the cycle of negative weight.
Explanation:
The Bellman-Ford algorithm can be used to detect a negative cycle in a graph. The program should iterate over the algorithm, in search of a relaxed edge. If any, the vertex of the specified edge is used as a starting point to get the target negative cycle.
Answer:
The answer to this question can be given as
true, false.
Explanation:
As we know that If-else statement is a part of the all programming language. If block always execute true value. The syntax of if-else statement can be given as
Syntax:
if()
{
//code for condition true.
}
else
{
//code for condition false.
}
Example:
#include <stdio.h>
int main()
{
int a=10; //declaring integer variable a.
if(a==10) //check condition
{
/*
starting of if block in( ) we pass condition for check for example
(a==10) where a is integer a variable.
*/
printf("value match.."); //true part
}
else
{
printf("value not match.."); //false part
}
return 0;
}
In the above example, a is an integer variable we assign value to it. and check the value by if-else statement. if the value is true it executes value match or print else part that is value not match.
So the answer to this question is true, false.
Answer:
the process of designing and laying out printed material
Explanation:
The other answers were wrong. Option A is correct