[28] Implement strStr()
题目
Implement strStr().
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Implement strStr().
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Given an array nums and a value val, remove all instances of that value in-place and return the new length.
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
Given a string containing just the characters '('
, ')'
, '{'
, '}'
, '['
and ']'
, determine if the input string is valid.
An input string is valid if:
Note that an empty string is also considered valid.
服务器版本: CentOS 7
docker pull tomcat:9
一些文件,如配置文件,需要存在,但在本地运行时,需要填入一些敏感信息,因此不想git再追踪这些文件的变化
命令如下:
git update-index --assume-unchanged 文件路径
例:
git update-index --assume-unchanged src\main\resources\application.yml
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string ""
.
Example 1:
Input: ["flower","flow","flight"]
Output: "fl"
服务器版本: CentOS 7
docker pull nginx
Roman numerals are represented by seven different symbols: I
, V
, X
, L
, C
, D
and M
.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
Given a 32-bit signed integer, reverse digits of an integer.
Example 1:
Input: 123
Output: 321
Example 2:
Input: -123
Output: -321
Example 3:
Input: 120
Output: 21
Note:
Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231, 231 − 1].
For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows.
只做学习研究之用,不得用于商业用途!
若资金允许,请点击 [https://www.jetbrains.com/idea/buy/] 购买正版,谢谢合作!
学生凭学生证可免费申请 [https://sales.jetbrains.com/hc/zh-cn/articles/207154369-学生授权申请方式] 正版授权!
创业公司可5折购买 [https://www.jetbrains.com/shop/eform/startup] 正版授权
nvm是个啥?nvm是一个可以让你在同一台机器上安装和切换不同版本node的工具
服务器环境: Centos 7
如果你系统没有安装git的话,请先安装git
sudo yum install git
timedatectl set-timezone Asia/Shanghai
timedatectl
添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
该依赖里默认包含了spring-data-redis和Jedis依赖,见这里