Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in ...
分类:
其他好文 时间:
2019-06-06 09:13:01
阅读次数:
101
Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: Cla ...
分类:
其他好文 时间:
2019-06-03 12:43:42
阅读次数:
98
就是使用KMP算法进行字符串的匹配,但是我发现我之前的kmp写的有问题,然后修补了一下板子漏洞2333 next数组含义: next[i]表示 到i为止,前缀 和 后缀 相同的个数 1 (为啥 1呢,比如 , ,这样的话,aabaab不是的话 就直接失配到aab,大概意思就是这样) c++ clas ...
分类:
其他好文 时间:
2019-06-03 12:39:51
阅读次数:
84
两个for 外层for负责处理原字符串 内层for负责处理匹配字符串 ...
分类:
其他好文 时间:
2019-05-27 13:19:38
阅读次数:
79
依赖注入:DI 又称控制反转:IoC 项目名字spring_DI 一、implement包中定义了两个接口Food和Person 1.接口Food package org.interfaces; public interface Food { public String eat(); //food接 ...
分类:
编程语言 时间:
2019-05-24 22:16:26
阅读次数:
131
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the ...
分类:
系统相关 时间:
2019-05-24 17:00:50
阅读次数:
126
My solution: Other guy's solution ...
分类:
其他好文 时间:
2019-05-24 10:35:26
阅读次数:
78
问题 在对spring boot项目进行修改后,重新启动时报如下错误: Composite-id class must implement Serializable: xxx xxx为具体的类 原因 找到xxx类,查看是否定义了多个@Id,如下图: 解决 如果该实体类对应的表只有一个主键,即图中的i ...
分类:
编程语言 时间:
2019-05-16 17:51:34
阅读次数:
921
Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it e ...
分类:
其他好文 时间:
2019-05-13 15:56:19
阅读次数:
91
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front ...
分类:
其他好文 时间:
2019-05-13 09:24:01
阅读次数:
122