Centos 安装 Redis
检查安装 GCC 环境
[rootVM-4-17-centos ~]# gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; no…
给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。 思路:
计算链表长度num,num - n就是需要删去结点的索引
其中若删去第一个结点,返回head.next;
/*** Definition for singly-linked list.* public …
最近在csdn网站上刷到一个题目,题目要求编写一个函数查找字符串中的最长公共前缀,题目如下: 给出的答案如下:
from typing import List
def longestCommonPrefix(strs:List[str]) -> str:if len(strs) 0:return i 0 #代…