Panda Guru LogoPanda
Guru

TikTok OA Oct 2024

Round 1

Questions: At the TikTok academy, students are learning how to improve video captions. You are given a string caption that only has small English letters (a to z). You can make two kinds of changes to the caption at any letter as many times as needed:

  1. Change the letter to the one right before it in the alphabet. You cannot change 'a' because it is already the first letter.
  2. Change the letter to the one right after it in the alphabet. You cannot change 'z' because it is already the last letter.

Your task is to make sure that every letter in the caption has at least one same letter next to it. For example, "aaabb" and "aaccdd" are good captions, but "abaaa" and "abcdef" are not.

Examples:

Specific question not provided.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.