PhonePe round 1 DSA

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2024-09-25Added By Anonymous
Source: Link
🧭 Experience: unknown
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: PhonePe
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown

2 questions
1. Given an array of integers, where you can move to left , right or an index which has the same exact value, Calculate the minimum number of moves in which you can move from 0 to last index.
Input : [1,3,2,3,5] , res = 3
2. Find longest palindromic substring . req space complexiity is O(1).


Couldn't solve the first one. Used expand from center approach in second one.
Comments