Hello, I am a CS student and I code in java. I have been working on my problem solving skills for about 2 years now. along with studying programming, I am taking some online courses to improve my skills and also I solve many problems on websites like codeforces and Hackerrank. so it would be a pleasure to help you find solutions for your problem and analyse them. we can first think of normal solutions and analyse their time and space complexity. then fine better solutions and improve them. because it is said that you shouldn't tell the most perfect solution in the beginning in any interview. you should first start with the brute force solution and then improve it. by the way, I am on a vacation now so I am almost available anytime for you.