โ† Amazon questions

Find last index of substring in string

Filed under Amazon

Given two strings s1 and s2, find the last starting index of s2 within s1. Return -1 if s2 is not present in s1.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.