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 |
| -- Get parameters for all stars with [Fe/H] < -2 with no BAD FLAGS set: | |
| -- You can also select a subset of the stars based on their | |
| -- properties. This example finds a set of metal-poor stars, without any | |
| -- flags set indicating that the observations or analysis is bad. | |
| SELECT TOP 300 | |
| s.apogee_id, s.ra, s.dec, s.glon, s.glat, | |
| s.vhelio_avg, s.vscatter, | |
| a.teff, a.logg, a.param_m_h, a.param_alpha_m, | |
| dbo.fApogeeAspcapFlagN(a.aspxcapflag), |
| # 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