Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,346 views
in Online Assessments by Expert (107,890 points) | 1,346 views

1 Answer

0 like 0 dislike
Here is the link to contest :

https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges

P1 : https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges/a-324

Sol : https://www.desiqna.in/5896/walmart-oa-coding-questions-and-solutions-set-16-2022

P2 : https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges/a-325

Sol : https://www.desiqna.in/5897/amazon-oa-sde1-coding-questions-and-solutions-2022-set-37

 

P3 : https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges/kumar-k-loves-tree

Sol : https://www.desiqna.in/5898/google-oa-coding-questions-and-solutions-set-16-2022

 

P4 : https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges/a-356

Sol : https://www.desiqna.in/5719/amazon-sde2-coding-oa-2022-july-set-32

Video sol :


 

 

Q1. Just normal division (BigInteger).
Q2. Just use one loop and calculate value of a[I]+((long)I*(long)I) and put into HashMap.sum of all (val-1) in hashmap is the answer.
Q3. Normal DFS.
Q4. Use hashmap track the xor values. When you will get repeated value of xor take the index from hashmap and subtract from current index. And take the maximum of all time.if xor is equal to zero just take maximum of index+1.
by Expert (107,890 points)
edited by