摘要:
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symme 阅读全文
摘要:
Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文
摘要:
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
摘要:
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1. The Max 阅读全文
摘要:
第一看完Dijkstra算法感觉就四个字————步步贪心 想学Dijkstra算法得了解动态规划的思想 怎么解释呢???举个例子 有一张图n个顶点m条边 每条边上都有权值叫你求顶点1到其他顶点的最短路径 step 1 找出离顶点1最近的点(这好找吧)使用一个数组将每个点到顶点1 的最短路径记录下来( 阅读全文
摘要:
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha 阅读全文
摘要:
今天无意想到除法,突然觉得自己对负数及负数的除法的意义并不清楚, 首先要明白负数中“负号”的意义,”负号”的意义在于“方向”。例如 我们定义 “给我”为+;“给你”为-。 那么下列除法用语言描述就是: 12/3=4,:给我12个苹果(+12),每次给我3个(+3),需要4次; 12/4=3:给我12 阅读全文
摘要:
简单粗暴的贴代码 import reclass Node: def __init__(self,data={"num":'00',"name":'星',"tel":'00'}): self.data=data self.next=None class Linklist: def __init__(s 阅读全文
摘要:
存数据 读数据 阅读全文
摘要:
参考https://blog.csdn.net/dacainiao007/article/details/8129637子查询:嵌套在其他查询中的查询称之。 子查询又称内部,而包含子查询的语句称之外部查询(又称主查询)。 所有的子查询可以分为两类,即相关子查询和非相关子查询 1. 非相关子查询是独立 阅读全文