Problem:
Given a non-empty string s, you may delete at most one character. Judge whether
you can make it a palindrome.
Example 1:
Input: "aba"
Output: True
| BCH: | |
| qq9yrhef7csy3yzgxgs0rvkvez440mk53gv8ulyu6a | |
| BNB: | |
| bnb1vmwl54jxj9yvsgz33xtyuvqnurdjy2raqnttkq | |
| BTC: | |
| bc1qn6ype8u5kgj672mvsez9wz9wt9wk22tzd5vprp |
| # Because Python has first-class functions, they | |
| # can be used to emulate switch/case statements! | |
| def switch_if(operator, a, b): | |
| if operator == 'add': | |
| return a + b | |
| elif operator == 'sub': | |
| return a - b | |
| elif operator == 'mul': | |
| return a * b |
| import numpy as np | |
| import os | |
| import shutil | |
| #range of model masses [solar masses] | |
| m_grid = np.array([0.3, 0.5, 0.8, 1.0, 1.2, 1.5, 2.0, 3.0, 5.0, 6.5, 8.0, 10.0]) | |
| #range of He abundance fractions | |
| y_grid = np.array([0.20, 0.25, 0.30, 0.35]) |
Problem:
Given a non-empty string s, you may delete at most one character. Judge whether
you can make it a palindrome.
Example 1:
Input: "aba"
Output: True