Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Is String a 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) { Boolean flag = palindrome("racecar"); Console.Write(flag); } public static Boolean palindrome(String str) { Boolean flag = false; int i=0; for(int j=str.Length-1; j>0; j--) { if(str[i++]==str[j]) { flag = true; } else { flag = false; break; } } return flag; } } }
run
|
edit
|
history
|
help
0
swapping
My Test
learning
Shalini_CSG_CodeTest
c# abstract
Median in two sorted lists (O(m*n))
Octavia
FixConsectiveDuplicates
project euler 14, C#
Gamez