<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pallindrome &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/pallindrome/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 02 Jun 2021 15:17:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Pallindrome &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Check a String is Palindrome</title>
		<link>https://www.sibeeshpassion.com/check-a-string-is-palindrome/</link>
					<comments>https://www.sibeeshpassion.com/check-a-string-is-palindrome/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 31 May 2015 13:02:21 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Pallindrome]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=2871</guid>

					<description><![CDATA[Introduction This tip covers how we can check a string is palindrome or not. Background Now a day you can expect a question in every Interviews that to write a program to check whether a String is palindrome or not. I thought of sharing my methods two find out the same 🙂 Using the Code We can do it in two ways: By creating char arrays By using string reverse method NB: There are some other methods also, for now I am sharing these two. By creating char arrays [csharp] private static bool chkPallindrome(string strVal) { try { int min [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>This tip covers how we can check a string is palindrome or not.</p>
<p><strong>Background</strong></p>
<p>Now a day you can expect a question in every Interviews that to write a program to check whether a String is palindrome or not. I thought of sharing my methods two find out the same 🙂</p>
<p><strong>Using the Code</strong></p>
<p>We can do it in two ways:</p>
<li>By creating char arrays</li>
<li>By using string reverse method</li>
<p>NB: There are some other methods also, for now I am sharing these two.</p>
<p><strong>By creating char arrays</strong></p>
<p>[csharp]<br />
private static bool chkPallindrome(string strVal)<br />
{<br />
     try<br />
     {<br />
          int min = 0;<br />
          int max = strVal.Length &#8211; 1;<br />
          while (true)<br />
          {<br />
               if (min &gt; max)<br />
               return true;<br />
               char minChar = strVal[min];<br />
               char maxChar = strVal[max];<br />
               if (char.ToLower(minChar) != char.ToLower(maxChar))<br />
               {<br />
                    return false;<br />
               }<br />
               min++;<br />
               max&#8211;;<br />
         }<br />
     }<br />
     catch (Exception)<br />
     {<br />
          throw;<br />
     }<br />
}<br />
[/csharp] </p>
<p><strong>By using string reverse method  </strong><br />
[csharp]<br />
private static void CheckAndDisplay(string strReal)<br />
{<br />
     string strRev;<br />
     char[] tmpChar = strReal.ToCharArray();<br />
     Array.Reverse(tmpChar);<br />
     strRev = new string(tmpChar);<br />
     if (strReal.Equals(strRev, StringComparison.OrdinalIgnoreCase))<br />
     {<br />
          Console.WriteLine(&quot;The string is pallindrome&quot;);<br />
     }<br />
     else<br />
     {<br />
           Console.WriteLine(&quot;The string is not pallindrome&quot;);<br />
     }<br />
     Console.ReadLine();<br />
}<br />
[/csharp]<br />
Please download to see the entire program. I hope it helps someone.</p>
<p><img decoding="async" src="http://www.c-sharpcorner.com/UploadFile/BlogImages/11162014232536PM/output.jpg" alt="" /></p>
<p><strong>Points of Interest</strong></p>
<p>Palindrome, Arrays, Array Manipulations</p>
<p><strong>History</strong></p>
<p>1st version: 16-11-2014</p>
<p>Thank you for reading.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/check-a-string-is-palindrome/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
