PhonePe round 1 DSA

Anonymous User
296
Sep 25, 2024

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 (1)