techgig0's blog

By techgig0, 2 months ago, In English

The challenge consists of 3 problems with score distribution of 20-50-100

20 score problem:

You have a square matrix $$$n$$$, initially empty, and you have to perform $$$k$$$ operations on it. For each operation you are given $$$1 \leq r \leq n$$$ and $$$1 \leq c \leq n$$$ and you have to fill all cells in row $$$r$$$ and all cells in column $$$c$$$. For each $$$k$$$ queries you have to output empty cells remaining.

Input:
$$$n$$$ $$$k$$$
$$$r_1$$$ $$$c_1$$$
$$$.$$$
$$$.$$$
$$$.$$$
$$$r_k$$$ $$$c_k$$$

Example:
3 2
1 2
1 1

50 score problem:

You are given $$$n$$$ coins and you have to use these to make a number as large as possible. You can use digits $$$[1-9]$$$ which has some cost given to you.

Input:
$$$n$$$
$$$x_1$$$ $$$x_2$$$ $$$x_3$$$ $$$x_4$$$ $$$x_5$$$ $$$x_6$$$ $$$x_7$$$ $$$x_8$$$ $$$x_9$$$

Example:
100
4 6 2 7 9 15 76 14 3

100 score problem:

You are given a range $$$[l, r]$$$ in which you have to output $$$k_{th}$$$ lucky number. A lucky number is defined as a number whose binary representation contains $$$101$$$.

Input:
$$$l$$$ $$$r$$$ $$$k$$$

Example:
10000 9487474746 507

 
 
 
 
  • Vote: I like it
  • -30
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Sharechat

All those asking these questions, there was a post revolving around on LinkedIN about the internship. So I just mailed to ShareChat and happened to get my resume shortlisted and got a test link.