Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Check if string is palindrome
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine(IsPalindrome("Hello, world!")); } public static bool IsPalindrome(string value) { int min = 0; int max = value.Length - 1; while (true) { if (min > max) { return true; } char a = value[min]; char b = value[max]; if (char.ToLower(a) != char.ToLower(b)) { return false; } min++; max--; } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
SHA Tester 2.1
Lesson 2-2
solution to problem #3 from projecteuler.net
Deadlock Example
Decimal Test2
The Fisher–Yates shuffle array extension method
Games
Get Combined Placeholder Settings and New Content Length
xyz
addr.sin_family == AF_UNSPEC
Please log in to post a comment.