Easy · Streams & I/O

Check palindrome in stream

Given a stream of characters delivered one at a time through letter(c), return whether the complete stream reads the same forwards and backwards, comparing characters exactly.

Examples

Example 1

{
  "chars": "abccba"
}

Output: true

Example 2

{
  "chars": "abc"
}

Output: false

Rebuild it in the studio

Read every interview problem free. Ten rooms need no account. A token opens a problem in full — Pro never counts.

More Streams & I/O problems