Dsa work in coding

Job ID: 35916598

Budget: ₹100 – ₹400 INR

I want some help in DSA problems in my exam there will be 3 questions
1) easy
2) medium
3) difficult
Programming languages - Java , C, C++ , python preferred is JAVA
Note:- Time Limit - 2.5 Hours
===========================================================================
Attaching 1 hard question with snippet only need to fill the function this the hard one

Contact no - +91 7982179713