Question: algorithm is functioning properly. 5. a) FIFA World Cup 2022 is going on, and as expected, thousands of 'pages' (with unique names) have been created
algorithm is functioning properly. 5. a) FIFA World Cup 2022 is going on, and as expected, thousands of 'pages' (with unique names) have been created on 'Facebook'. Facebook is providing two types of search criteria so that the fans can easily search for their desired pages. If the 'query' directly matches with the title of any existing page, it only shows that in the suggestion. Otherwise, it shows all the pages that start with that query string. Discuss an effective approach to satisfy the requirements. (Pseudocodes not required) b) Consider the following numbers for constructing a segment-tree: Showing detailed steps, perform the following operations on a Segment Tree (Array index starts from 1): i. Build the tree using the above-mentioned numbers where the internal nodes represent the sum of values within a given range. ii. Increment all values within the range (4,8) by 5 . iii. Increment all values within the range (1,9) by 10 . iv. Show the summation of the range (2,4). v. Show the summation of the range (3,7). vi. Add 7 to the value at index-8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
