- 博客(5)
- 收藏
- 关注
原创 LeetCode:String to Integer (atoi)没你想的那么简单
题目: Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca
2017-04-10 21:16:35
403
原创 LeetCode:ZigZag Conversion
题目描述 The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H N A P L S
2017-04-10 11:18:30
272
原创 LeetCode:Longest Palindromic Substring最长回文字符串
题目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: “babad” Output: “bab”Note: “aba” is also a valid answer. E
2017-04-09 17:03:12
314
原创 马踏棋盘算法
问题定义: 将马随机放在国际象棋的Board[0~7][0~7]的某个方格中,马按走棋规则进行移动。,走遍棋盘上全部64个方格。编制非递归程序,求出马的行走路线,并按求出的行走路线,将数字1,2,…,64依次填入一个8×8的方阵,输出之。思路: 利用回溯法的思想,马的走法总共有8,c[8]={1,2,1,2,-1,-2,-1,-2},b[8]={2,1,-2,-1,2,1,-2,-1},c是横坐标
2017-03-31 22:50:59
1157
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
1