Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 votes
3.9k views

Question 1

Given a_ap(first term of ap), d(common diffrence), a_gp(first term of gp), r(common ratio), and n, generate a sequence of length 2n where even indices hold the first n terms of an AP and odd indices hold the first n terms of a GP.

Question 2

Given a 26×26 cost matrix and a string s, compute the total cost of converting each s[i] to s[i+1] sequentially.The string is composed of only upper case characters.

Question 3

Given an array, choose 1 ≤ l < r ≤ n and replace elements in (l, r) with min(a[l], a[r]) any number of time to maximize the total array sum.

Question 4

Given an array a[] and a number k, count pairs (i, j) where:

  • a[i] * a[j] == k
  • a[i]^2 + a[j]^2 is even
  • a[i] XOR a[j] is even
by (610 points) | 3.9k views

Your answer

Privacy: Your email address will only be used for sending these notifications.
Welcome to Itjobxs ; we help companies ease their recruitment process ; we shortlist talented candidates via our portal and send those profiles for job opportunities to IT companies. We also provide IT consulting and services.
23 questions
38 answers
22 users