<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Palindrome in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466733#M2000640</link>
    <description>&lt;P&gt;Better to try to figure it out for youself than have others do it. it's the only way to really learn.&lt;/P&gt;&lt;P&gt;I'd in fact hope your teacher does find it. You're only cheating yourself.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Apr 2021 07:36:08 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2021-04-18T07:36:08Z</dc:date>
    <item>
      <title>Palindrome</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466729#M2000636</link>
      <description>&lt;P&gt;Palindrome is a string that reads the same from both sides. The string &lt;STRONG&gt;s&lt;/STRONG&gt; is given. Find the largest length of the substring that is not a palindrome.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Input data&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;The input file contains the string &lt;STRONG&gt;s&lt;/STRONG&gt;. It consists only of lowercase letters of the Latin alphabet, is not empty, its length does not exceed 100 characters.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;In the output file, output the answer to the task, if there are several answers, select the lexicographically minimal one. If all substrings of s are palindromes, output NO SOLUTION to the output file.&lt;/P&gt;
  &lt;P&gt;example:&lt;/P&gt;
  &lt;P&gt;1)Input data&lt;/P&gt;
  &lt;P&gt;abba&lt;/P&gt;
  &lt;P&gt;output&lt;/P&gt;
  &lt;P&gt;abb&lt;/P&gt;
  &lt;P&gt;2) input data&lt;/P&gt;
  &lt;P&gt;aaaaaaaaa&lt;/P&gt;
  &lt;P&gt;ouput &lt;/P&gt;
  &lt;P&gt;no solution&lt;/P&gt;
  &lt;P&gt;3)input&lt;/P&gt;
  &lt;P&gt;abcghgcba&lt;/P&gt;
  &lt;P&gt;output&lt;/P&gt;
  &lt;P&gt;abcghgcb&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 16:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466729#M2000636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-04-17T16:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Palindrome</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466730#M2000637</link>
      <description>&lt;P&gt;Hello Symbat,&lt;/P&gt;&lt;P&gt;Here you go:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lc_string  TYPE C LENGTH 64 VALUE 'abba',
      lc_reverse TYPE C LENGTH 64,
      li_length  TYPE I VALUE -1.

DO.
  CALL FUNCTION 'STRING_REVERSE'
    EXPORTING
      string          = lc_string
      lang            = sy-langu
    IMPORTING
      rstring         = lc_reverse
    EXCEPTIONS
      too_small       = 1
      OTHERS          = 2.

  IF sy-subrc = 0 AND lc_string = lc_reverse. "Check if string matches reverse
    li_length = strlen( lc_string ) - 1.
    IF li_length &amp;gt;= 1.
      lc_string = lc_string(li_length). "Remove last character of string and try again
    ELSE.
      EXIT. "String too small -&amp;gt; all characters were the same
    ENDIF.
  ELSE.
    EXIT. "Strings do not match anymore in reverse
  ENDIF.
ENDDO.

IF li_length &amp;gt; 0.
  WRITE |Solution: | &amp;amp;&amp;amp; lc_string.
ELSEIF li_length = 0.
  WRITE 'No solution (all characters are the same).'.
ELSE.
  WRITE 'No solution (no palindrome).'.
ENDIF
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Let's just hope your teacher does not read on SCN and sees that you're letting others do your homework &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;BR /&gt;Marco&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 17:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466730#M2000637</guid>
      <dc:creator>Marco_Flamm</dc:creator>
      <dc:date>2021-04-17T17:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Palindrome</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466731#M2000638</link>
      <description>&lt;P&gt;haha, I hope so too.&lt;/P&gt;&lt;P&gt;thank youu&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 17:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466731#M2000638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-04-17T17:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Palindrome</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466732#M2000639</link>
      <description>&lt;P&gt;You‘re welcome, Symbat. Please do not forget to „Accept“ answers, if helpful. This helps others to find solutions easier, when searching for similar questions. Thank you.&lt;/P&gt;&lt;P&gt;Best Regards&lt;BR /&gt;Marco&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 17:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466732#M2000639</guid>
      <dc:creator>Marco_Flamm</dc:creator>
      <dc:date>2021-04-17T17:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Palindrome</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466733#M2000640</link>
      <description>&lt;P&gt;Better to try to figure it out for youself than have others do it. it's the only way to really learn.&lt;/P&gt;&lt;P&gt;I'd in fact hope your teacher does find it. You're only cheating yourself.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 07:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/palindrome/m-p/12466733#M2000640</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-04-18T07:36:08Z</dc:date>
    </item>
  </channel>
</rss>

