判断回文递归算法实现

static bool IsPalindrome(string s) { if (num >= s.Length – num – 1) { return true; } else if (s[num] == s[s.Length – num – 1]) { num++; // 全局变量 IsPalindrome(s); return true; } else { return false; } } 

    原文作者:递归算法
    原文地址: https://blog.csdn.net/kntao/article/details/6186407
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞