For which of the following situations is a nested loop required? It is a Multiple Select Question (MSQ).
1.To find the pair of students who have the same birthdays from the “Scores” dataset
2.To find the pair of students who scored the same marks in Physics from the “Scores” dataset
3.To find the number of words which have highest letter count from the “Words” dataset
4.To find the number of bills from the same shop from the “Shopping Bills” dataset
Answers
Answer:
2. To find the pair of student who scored the same marks in Physics from the scores dataset.
This is the right answer.
Explanation:
Please mark the answer as brainliest if you found it helpful.
NESTED LOOPS
Nested loops are required to find the number of words which have highest letter count from "words" dataset.
CHARACTERISTICS OF NESTED LOOPS:
* A nested loop is one that is contained within another loop. The nested loop is supported by Java script. The loop can have one or more loops, or it can simply have any number of loops specified within another loop, and it can even have n levels of nesting.
* The inner loop is also known as the nested loop, while the outer loop is the loop in which the nested loop is defined. The outer loop always runs first, followed by the inner loop, which runs once for each time the outer loop runs.
* When using multi-level nested loops, the outer loop runs first, followed by the first inner loop, the second inner loop, and so on.