首页
学习
活动
专区
工具
TVP
发布

章鱼的慢慢技术路

专栏作者
249
文章
390356
阅读量
49
订阅数
剑指 Offer 03. 数组中重复的数字
在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。
Zoctopus
2022-05-10
1470
Go语法题-常见语法题一
golang中有规定, switch type 的 case T1 ,类型列表只有⼀个,那么 v := m.(type) 中的 v 的类型就是T1类型。
Zoctopus
2021-10-09
4030
两天时间兼职运维从零搭建一套分布式文件云存储系统的收获
部门的小leaderC想让我熟悉整个业务,知道来龙去脉,让我从零开始搭建一套环境,也方便开发人员直接在上面进行测试,所以从这周一开始,我的工作就来了。
Zoctopus
2021-08-31
5160
开始接学生的毕设课设了
好久没更新博客文章了,因为自己的目标发生了变化,目前主要在自己搭建的博客以写作调身心和微信公众号写一写文章和对职场的感触。
Zoctopus
2021-08-06
1.5K1
07. 重建二叉树
输入某二叉树的前序遍历和中序遍历的结果,请重建该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。
Zoctopus
2021-03-08
3240
剑指 Offer 06. 从尾到头打印链表
题目 力扣-剑指 Offer 05. 替换空格 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s = "We are happy." 输出:"We%20are%20happy." 限制: 0 <= s 的长度 <= 10000 题解 该题难度为简单。 解法一:两个for循环 1,先声明两个整型数组; 2,第一个for循环从头到尾记录链表的每个节点的值; 3,第二个for循环逆序记录链表的每个节点的值。 //Go /** * Definition for singly-
Zoctopus
2021-03-07
2800
剑指 Offer 05. 替换空格
题目 力扣-剑指 Offer 05. 替换空格 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s = "We are happy." 输出:"We%20are%20happy." 限制: 0 <= s 的长度 <= 10000 题解 该题难度为简单。 解法一:使用strings.Replace //Go func replaceSpace(s string) string { return strings.Replace(s, " ", "%20", -1) }
Zoctopus
2021-03-05
2410
剑指 Offer 04.二维数组中的查找
在一个 n * m 的二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个高效的函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。
Zoctopus
2021-03-05
2220
LeetCode-38. Count and Say | 外观数列
The count-and-say sequence is a sequence of digit strings defined by the recursive formula:
Zoctopus
2021-02-25
3920
LeetCode-35. Search Insert Position | 搜索插入位置
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
Zoctopus
2021-02-25
3230
LeetCode-28. Implement strStr() | 实现 strStr()
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Zoctopus
2021-02-25
3540
LeetCode-26.Remove Duplicates from Sorted Array | 删除排序数组中的重复项
Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.
Zoctopus
2021-02-25
4310
LeetCode-21.Merge Two Sorted Lists | 合并两个有序链表
Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.
Zoctopus
2021-02-25
2070
LeetCode-20. Valid Parentheses | 有效的括号
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Zoctopus
2021-02-25
3660
LeetCode-13. Roman to Integer | 罗马数字转整数
题目 LeetCode 力扣 题解 先维护一个map,用于建立罗马数字和整数的关系,接着挨个破译即可。 //Go func romanToInt(s string) int { var charToIntMap = make(map[byte]int, 8) charToIntMap['I'] = 1 charToIntMap['V'] = 5 charToIntMap['X'] = 10 charToIntMap['L'] = 50 charToIntMa
Zoctopus
2021-02-25
1930
LeetCode-14. Longest Common Prefix | 最长公共前缀
Write a function to find the longest common prefix string amongst an array of strings.
Zoctopus
2021-02-25
3670
LeetCode-9. Palindrome Number | 回文数
Given an integer x, return true if x is palindrome integer.
Zoctopus
2021-02-22
3310
LeetCode-7. Reverse Integer | 整数反转
Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0.
Zoctopus
2021-02-05
3550
LeetCode-1-Two Sum | 两数之和
简单题。常规解法(解法1),用两个for循环来做,第一个循环从数组nums下标为0开始遍历,第二个循环从数组下标1开始遍历,如果没找到两数之和的target值,就将两个循环的下标加1,继续循环,直到找到目标值,返回结果并退出。
Zoctopus
2021-01-05
2830
数学趣题_父亲分羊
有个老父亲,有17头羊,临终前把三个儿子叫来。分给大儿子一半的羊,二儿子1/3的羊,小儿子1/9的羊。三个儿子不知道怎么分,只好请教邻居。聪明的邻居借给了他们一头羊,这样总共就有18头。大儿子领走一半9头羊,二儿子领走1/3共6头羊,小儿子领走1/9,也就是2头羊。邻居最后把借的羊牵回去了。我们的问题是,满足这样条件的数字还有哪些?即遗产有n头羊,大儿子分得1/x, 二儿子分得1/y, 小儿子分得1/z,邻居借给一头羊。请编程找出这些满足条件的(n, x, y, z)。
Zoctopus
2018-12-27
5140
点击加载更多
社区活动
Python精品学习库
代码在线跑,知识轻松学
热点技术征文第五期
新风口Sora来袭,普通人该如何把握机会?
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·干货材料·成员作品·最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档