Jump to content

Palindrome ki recursive function anta..amazingly elegant code!!!!


Recommended Posts

Posted

[quote author=John Galt link=topic=201923.msg2463137#msg2463137 date=1307837565]
@gr33d @gr33d @gr33d standard libraries unnappud vaadeskovali..because they are standard..vaatini kuda vaddu ani nedi nuvve raaskunte time and energy waste..code reuse cheskovali antaru..of course adi vere context lo anuko..but ne question ki kuda idi varthistundi..why reinvent the wheel?  &D_@@ &D_@@ &D_@@
[/quote] @gr33d  S%Hi

  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

  • krldr871

    16

  • robo

    8

  • topulake topu

    8

  • Kakateeyudu

    5

Top Posters In This Topic

Posted

[quote author=John Galt link=topic=201923.msg2463137#msg2463137 date=1307837565]
@gr33d @gr33d @gr33d standard libraries unnappud vaadeskovali..because they are standard..vaatini kuda vaddu ani nedi nuvve raaskunte time and energy waste..code reuse cheskovali antaru..of course adi vere context lo anuko..but ne question ki kuda idi varthistundi..why reinvent the wheel?  &D_@@ &D_@@ &D_@@
[/quote][quote author=topulake topu link=topic=201923.msg2463134#msg2463134 date=1307837520]
@gr33d @gr33d ....kani nuvu em point make chestunavo ardam kaled baa..
[/quote]logic ento telsukundam ani  cry@fl cry@fl cry@fl

malli code radam ani kadu  cry@fl cry@fl cry@fl

Posted

[quote author=ROBO link=topic=201923.msg2463147#msg2463147 date=1307837725]
logic ento telsukundam ani  cry@fl cry@fl cry@fl

malli code radam ani kadu  cry@fl cry@fl cry@fl
[/quote]
aithe ok  &D_@@ &D_@@ &D_@@ &D_@@

Posted

[quote author=John Galt link=topic=201923.msg2463164#msg2463164 date=1307837927]
aithe ok  &D_@@ &D_@@ &D_@@ &D_@@
[/quote] *7*^ *7*^ *7*^ endhi ok maku telsina sagane confuse chesi itta chestunav

Palindrome ki recursive function anta..amazingly elegant code!!!!

ee tadu peru rnti lopala chesindhi etti  *7*^ *7*^ *7*^ @3$% @3$% @3$%

Posted

[quote author=ROBO link=topic=201923.msg2463190#msg2463190 date=1307838201]
*7*^ *7*^ *7*^ endhi ok maku telsina sagane confuse chesi itta chestunav

Palindrome ki recursive function anta..amazingly elegant code!!!!

ee tadu peru rnti lopala chesindhi etti  *7*^ *7*^ *7*^ @3$% @3$% @3$%
[/quote]
correct ey kada ba title...apt ga ne undhi ..
code keka ani discuss chesam ga .... ~"! ~"!

Posted

[quote author=topulake topu link=topic=201923.msg2463206#msg2463206 date=1307838335]
correct ey kada ba title...apt ga ne undhi ..
code keka ani discuss chesam ga .... ~"! ~"!
[/quote]wer is palindrome ki recursive code
function undhi anaku
cry@fl cry@fl cry@fl

Posted

[quote author=ROBO link=topic=201923.msg2463224#msg2463224 date=1307838603]
wer is palindrome ki recursive code
function undhi anaku
cry@fl cry@fl cry@fl
[/quote]
ne yavvaa..recursive func ante daanni adhe piluchukuntuu untadi..aa code lo chudu..aa function lopala aa function ke malli call untadi..daanne recursive function antaru  H&T@ H&T@ H&T@ H&T@

Posted

cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl  naku last line ardam kaledu  cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl

Posted

[quote author=RBK link=topic=201923.msg2465045#msg2465045 date=1307901612]
cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl  naku last line ardam kaledu  cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl cry@fl
[/quote]
last line lo pedda logic emledu baa..rendu statements ni kalipi kodtunnadu anthe..
s[0] == s[s.length() - 1] ante basic ga compare chestondi..so it will return either true or false..
inko statement enti ante recursion..
ippudu for example [b]A car, a man, a maraca[/b]
idi oka palindrome..first s[0] and s[s.length() - 1] compare chestunnam..ante A (first letter) and a (last letter).
ee rendu match ayyayi..so next manaki car a man a marac matrame migilindi..so daanitho kotha string tayaru chestunnam..and daanni pass chesi malli same comparison cheyamantunnam through recursion..ala ala iterative ga pothu untadi..

Posted

[quote author=John Galt link=topic=201923.msg2465106#msg2465106 date=1307902602]
last line lo pedda logic emledu baa..rendu statements ni kalipi kodtunnadu anthe..
s[0] == s[s.length() - 1] ante basic ga compare chestondi..so it will return either true or false..
inko statement enti ante recursion..
ippudu for example [b]A car, a man, a maraca[/b]
idi oka palindrome..first s[0] and s[s.length() - 1] compare chestunnam..ante A (first letter) and a (last letter).
ee rendu match ayyayi..so next manaki car a man a marac matrame migilindi..so daanitho kotha string tayaru chestunnam..and daanni pass chesi malli same comparison cheyamantunnam through recursion..ala ala iterative ga pothu untadi..
[/quote]

CITI_$D# CITI_$D# CITI_$D# CITI_$D# thankyou thankyou thankyou thankyou thankyou thankyou

Posted

[quote author=John Galt link=topic=201923.msg2465106#msg2465106 date=1307902602]
last line lo pedda logic emledu baa..rendu statements ni kalipi kodtunnadu anthe..
s[0] == s[s.length() - 1] ante basic ga compare chestondi..so it will return either true or false..
inko statement enti ante recursion..
ippudu for example [b]A car, a man, a maraca[/b]
idi oka palindrome..first s[0] and s[s.length() - 1] compare chestunnam..ante A (first letter) and a (last letter).
ee rendu match ayyayi..so next manaki car a man a marac matrame migilindi..so daanitho kotha string tayaru chestunnam..and daanni pass chesi malli same comparison cheyamantunnam through recursion..ala ala iterative ga pothu untadi..
[/quote]

IsPalindrome(s.substr(1,s.length() - 2));  edi explain sei baa konchem clear ga  cry@fl cry@fl cry@fl cry@fl cry@fl

Posted

[quote author=Legend Of Legends link=topic=201923.msg2465169#msg2465169 date=1307903569]
IsPalindrome(s.substr(1,s.length() - 2));  edi explain sei baa konchem clear ga  cry@fl cry@fl cry@fl cry@fl cry@fl
[/quote]
first letter and last letter thisivesi (since avi rendu equal ani compare chesam kadha) rest of the string ni same function ki pass chesi recursive ga call chestunnam

Posted

[quote author=Cheddi Chinnodu link=topic=201923.msg2465188#msg2465188 date=1307903838]
first letter and last letter thisivesi (since avi rendu equal ani compare chesam kadha) rest of the string ni same function ki pass chesi recursive ga call chestunnam
[/quote]

aa vishyam ardam indi baa......  same function ante ye function ela pass chestunnam  cry@fl cry@fl cry@fl cry@fl cry@fl

Posted

[quote author=Legend Of Legends link=topic=201923.msg2465201#msg2465201 date=1307904083]
aa vishyam ardam indi baa......  same function ante ye function ela pass chestunnam  cry@fl cry@fl cry@fl cry@fl cry@fl
[/quote]

bool [b]IsPalindrome(string s)[/b] {
  if(s.length() <= 1) return true;
  return (s[0] == s[s.length - 1]) && [b]IsPalindrome(s.substr(1,s.length() - 2)[/b]);
}

Ispalindrome ane function ni malli call chestunnam kadha baa.....recursive ga ela call cheyyalo neeku teliyadhaa

Posted

[quote author=Cheddi Chinnodu link=topic=201923.msg2465210#msg2465210 date=1307904231]
bool [b]IsPalindrome(string s)[/b] {
  if(s.length() <= 1) return true;
  return (s[0] == s[s.length - 1]) && [b]IsPalindrome(s.substr(1,s.length() - 2)[/b]);
}

Ispalindrome ane function ni malli call chestunnam kadha baa.....recursive ga ela call cheyyalo neeku teliyadhaa
[/quote]

bulb effudu yeligindhi........  nen CS ye kani coding mukka kuda radhu........  FYI nen kaka ni  s%H# s%H# s%H# s%H# s%H# s%H#

×
×
  • Create New...