Sunday, September 25, 2022
HomeSoftware DevelopmentPaytm Interview Expertise for SDE

Paytm Interview Expertise for SDE


View Dialogue

Enhance Article

Save Article

Like Article

View Dialogue

Enhance Article

Save Article

Like Article

For the screening take a look at Paytm carried out a 1-hour coding spherical on Hackerank. There have been 2 questions :

Drawback 1. There are N duties and two interns, if intern 1 completes the i_th process he will get the reward reward1[I], and if the 2nd intern completes the duty he will get reaward2[i].  They’ll decide duties in any order however intern 1 can solely do Okay duties remainder of the N-Okay duties needs to be performed by intern 2. Discover the utmost collective reward they’ll get by finishing these duties.

Enter:

N: integer
reward1: array of size N
reward2: array of size N
Okay: variety of duties intern1 can do

Instance:

N=5
reward1=[1,2,3,1,2]
reward2=[1,1,1,5,6]
Okay=3

Resolution: Max reward that may be collected is 17. Intern 1 does duties 1,2 and three and intern 2 do 4 and 5 with a purpose to gather max reward.

Drawback 2: Given an array arr discover out all of the distinctive pairs (arr[I], arr[j]) from an array satisfying the next relation:

| arr[i]+arr[j] | + | arr[i]-arr[j] |=Okay
Enter:
arr: an array containing N integers 
Okay: integer 
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments