Use CT10 & get flat 10% OFF on Prime Subscription Question 1 Alice and her friends are playing a game of verbal Kho-Kho. Alice is acting as a mediator, and the rest of the N friends are seated on N chairs, one sach Alice starts by providing a paper with a single-digit number to the friend present at number 1. Let's denote friends by F, where F will be of size N. FIL FINE presents friends seated respectively. After receiving the paper with a digit, F[I] will enact and try to tell F[2] without speaking. Similarly, F[2] will communicate to the next person le F[3]. This continues until the last person F[N] understands the digit. Finally, the last person will write the digit on a separate paper and give it to Alice to compare bo papers. If the digits are similar then, Alice will give a T-shirt to each friend. However, if the digits do not match, Alice will ask each friend's digits, and she will offer the shirts to only those who understood the digits correctly. Given N number of friends and digit array D, denoting the digit understood by each friend F. finds out how many of Alice's friends have not enacted well OR did not understand the enactment by the previous friend correctly. Example 1: 3-> N, number of friends 444-array D. denoting digit understanding by N friends Output: 0 Explanation: All of them understood the digits correctly. Example 2: 5 12322 Output: Hi DELL 12:12 PM 1881

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
None
Use CT10 & get flat 10% OFF on Prime Subscription
Question 1
Alice and her friends are playing a game of verbal Kho-Kho. Alice is acting as a mediator, and the rest of the N friends are seated on N chairs, one sach
Alice starts by providing a paper with a single-digit number to the friend present at number 1. Let's denote friends by F, where F will be of size N. FIL FINE presents
friends seated respectively. After receiving the paper with a digit, F[I] will enact and try to tell F[2] without speaking. Similarly, F[2] will communicate to the next person le
F[3]. This continues until the last person F[N] understands the digit. Finally, the last person will write the digit on a separate paper and give it to Alice to compare bo
papers. If the digits are similar then, Alice will give a T-shirt to each friend. However, if the digits do not match, Alice will ask each friend's digits, and she will offer the
shirts to only those who understood the digits correctly.
Given N number of friends and digit array D, denoting the digit understood by each friend F. finds out how many of Alice's friends have not enacted well OR did not
understand the enactment by the previous friend correctly.
Example 1:
3-> N, number of friends
444-array D. denoting digit understanding by N friends
Output:
0
Explanation:
All of them understood the digits correctly.
Example 2:
5
12322
Output:
Hi
DELL
12:12 PM
1881
Transcribed Image Text:Use CT10 & get flat 10% OFF on Prime Subscription Question 1 Alice and her friends are playing a game of verbal Kho-Kho. Alice is acting as a mediator, and the rest of the N friends are seated on N chairs, one sach Alice starts by providing a paper with a single-digit number to the friend present at number 1. Let's denote friends by F, where F will be of size N. FIL FINE presents friends seated respectively. After receiving the paper with a digit, F[I] will enact and try to tell F[2] without speaking. Similarly, F[2] will communicate to the next person le F[3]. This continues until the last person F[N] understands the digit. Finally, the last person will write the digit on a separate paper and give it to Alice to compare bo papers. If the digits are similar then, Alice will give a T-shirt to each friend. However, if the digits do not match, Alice will ask each friend's digits, and she will offer the shirts to only those who understood the digits correctly. Given N number of friends and digit array D, denoting the digit understood by each friend F. finds out how many of Alice's friends have not enacted well OR did not understand the enactment by the previous friend correctly. Example 1: 3-> N, number of friends 444-array D. denoting digit understanding by N friends Output: 0 Explanation: All of them understood the digits correctly. Example 2: 5 12322 Output: Hi DELL 12:12 PM 1881
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education