Apple SSE Screening Round

apple logo
apple
February 24, 2026 · 1 reads

Summary

I experienced a screening round at Apple where I was given a string manipulation problem involving generating all possible pretty odd statements from a nested list of words.

Full Experience

I was given a string manipulation problem during my Apple SSE screening round. The problem involved generating all possible "pretty odd statements" from a given input structure.

The input structure was:

{
{"The", "A"},
{"dog","cat"},
{"runs","walks"},
{"quickly","slowly"},
{".","!"}
}

Expected Output:
The dog runs quickly.
The dog runs slowly.
The dog walks quickly.
The dog walks slowly.
The cat runs quickly.
The cat runs slowly.
The cat walks quickly.
The cat walks slowly.

I then provided a Java solution to this problem.

Interview Questions (1)

1.

Generate Pretty Odd Statements

Data Structures & Algorithms·Medium

Given a nested list of strings, generate all possible "pretty odd statements" by taking one word from each inner list and concatenating them. The order of inner lists must be maintained.

Input Example:

{
{"The", "A"},
{"dog","cat"},
{"runs","walks"},
{"quickly","slowly"},
{".","!"}
}

Expected Output:
The dog runs quickly.
The dog runs slowly.
The dog walks quickly.
The dog walks slowly.
The cat runs quickly.
The cat runs slowly.
The cat walks quickly.
The cat walks slowly.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!