public class Solution { StackS = new Stack (); Queue Q = new Queue (); public bool IsPalindrome(string s) { if (s.Length == 0) { return true; } s = s.ToLower(); foreach (var c in s) { if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) { S.Push(c); Q.Enqueue(c); } } while (S.Count > 0) { var ss = S.Pop(); var qq = Q.Dequeue(); if (ss != qq) { return false; } } return true; }}