Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Palindrome Check using Queue (easy)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Problem Statement

Given a string s, determine if that string is a palindrome using a queue data structure. Return true if the string is a palindrome. Otherwise, return false.

A palindrome is a word, number, phrase, or other sequence of characters that reads the same forward and backward, ignoring spaces, punctuation, and capitalization.

Examples

Example 1

  • Input: s = "madam"
  • Output: true
  • Explanation: The word "madam" reads the same forwards and backwards.

Example 2

  • Input: s = "openai"
  • Output: false

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible