Question: LinkedIn | Recent Online Assessment 2025 | Computer Frames Resolution Problem Cracking the LinkedIn Coding Round | Combinatorics & Array Configurations
0
Entering edit mode

Question 1: Computer Frames Resolution

Problem Statement:

Given n computer frames, each frame is associated with a power denoted by the array power, where power[i] represents the power of the ith frame. The current resolution starts at 1.

Each frame can be unused or it can be utilized in one of three ways:

  1. As a magnifying frame, which multiplies the current resolution by power[i].
  2. As a reducing frame, which divides the current resolution by power[i].
  3. By using both its magnifying and reducing powers together, leaving the current resolution unchanged.

The target array contains q queries representing target resolutions. For each query, calculate the number of configurations required to achieve the target resolution, modulo 10^9+7. It is not necessary to use all frames; each frame can be unused or used based on the configuration choice.

Two configurations are considered different if at least one frame is used in one configuration but not in the other or if a frame is used in different ways in both configurations. For instance, a configuration using frame 1 and another that does not use frame 1 are considered different. Similarly, using frame 1 as a magnifying frame in one configuration and as a reducing frame in another counts as different configurations.

Example:

Given n = 2

power = [1, 2]

q = 3

ADD COMMENTlink 1 day ago Rohit • 20

Login before adding your answer.

Similar Posts
Loading Similar Posts