Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

My first reaction was, total No. of strings - no. of palindromic strings. But looks like counting all palindromic strings is not that easy.. So it has to be tackled from the other side: composing Anti-Palindrome directly. And then I found this link: https://github.com/algorhythms/HackerRankAlgorithms/blob/master/AntiPalindromic%20Strings.py

Totally borrowed his code. So will not paste it here.

posted on 2015-04-30 15:30  Tonix  阅读(242)  评论(0)    收藏  举报