Company: Meesho (business analyst)
Difficulty: medium
Students Liking Physics and Chemistry Problem Description In a group of 50 students, 30 like physics and 20 like chemistry. How many students like only chemistry, if 6 students like both? Examples Example 1: Input: Total students = 50, Physics = 30, Chemistry = 20, Both = 6 Output: 14 Explanation: Students who like only Chemistry = (Students liking Chemistry) - (Students liking both) = 20 - 6 = 14. Constraints Total students: 50 Students liking Physics: 30 Students liking Chemistry: 20 Students liking both Physics and Chemistry: 6 German Speakers and Adults Ratio Problem Description In a society with a total population of 1000, the sex ratio of male to female is 4:6. 30% of the males living in the society know how to speak German. Among the males who know how to speak German, 70% are adults. Calculate the number of males who know how to speak German and are not adults. Examples Example 1: Input: Total population = 1000, Male:Female ratio = 4:6, Males speaking German = 30%, German-speak