From bebe3181e94583f8a72d4a187b7df7ca428bb122 Mon Sep 17 00:00:00 2001 From: Ujjwal9125 <89153035+Ujjwal9125@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:34:34 +0530 Subject: [PATCH] Update Intermediate.txt --- Intermediate.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Intermediate.txt b/Intermediate.txt index f0f1651..89f5be2 100644 --- a/Intermediate.txt +++ b/Intermediate.txt @@ -1768,3 +1768,24 @@ public class MergeSort { } } +3. Write a function that tests whether a string is a palindrome. +Solution : + +class Solution { + int isPalindrome(String S) { + char [] ans=new char[S.length()]; + for(int i=0;i