PhonePe round 1 DSA
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-09-25Added By Anonymous
Source: Link
Company: PhonePe
Role: software engineer 1, software engineer 2
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
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. required space complexity is O(1).
Couldn't solve the first one. Used expand from center approach in second one.