• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
MoonBeautiful
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2024年8月17日

leetcode面试经典150题- 6. Z 字形变换
摘要: func convert(s string, numRows int) string { if numRows <= 1 { return s } m := 2*numRows - 2 ans := "" right := len(s) for raw := 0; raw < numRows; ra 阅读全文
posted @ 2024-08-17 02:50 MoonBeautiful 阅读(6) 评论(0) 推荐(0)
 
leetcode面试经典150题- 151. 反转字符串中的单词
摘要: https://leetcode.cn/problems/reverse-words-in-a-string/description/?envType=study-plan-v2&envId=top-interview-150 package leetcode150 import "testing" 阅读全文
posted @ 2024-08-17 02:15 MoonBeautiful 阅读(11) 评论(0) 推荐(0)
 
leetcode面试经典150题- 14. 最长公共前缀
摘要: https://leetcode.cn/problems/longest-common-prefix/?envType=study-plan-v2&envId=top-interview-150 package leetcode150 import ( "testing" ) func TestLo 阅读全文
posted @ 2024-08-17 02:05 MoonBeautiful 阅读(25) 评论(0) 推荐(0)
 
leetcode面试经典150题- 58. 最后一个单词的长度
摘要: https://leetcode.cn/problems/length-of-last-word/?envType=study-plan-v2&envId=top-interview-150 func lengthOfLastWord(s string) int { ll := 0 for i := 阅读全文
posted @ 2024-08-17 01:47 MoonBeautiful 阅读(9) 评论(0) 推荐(0)
 
leetcode面试经典150题- 12. 整数转罗马数字
摘要: https://leetcode.cn/problems/integer-to-roman/solutions/774611/zheng-shu-zhuan-luo-ma-shu-zi-by-leetcod-75rs/?envType=study-plan-v2&envId=top-intervie 阅读全文
posted @ 2024-08-17 01:42 MoonBeautiful 阅读(13) 评论(0) 推荐(0)
 
leetcode面试经典150题- 135. 分发糖果
摘要: https://leetcode.cn/problems/candy/solutions/533150/fen-fa-tang-guo-by-leetcode-solution-f01p/?envType=study-plan-v2&envId=top-interview-150 go packag 阅读全文
posted @ 2024-08-17 01:18 MoonBeautiful 阅读(13) 评论(0) 推荐(0)
 
leetcode面试经典150题- 42. 接雨水
摘要: https://leetcode.cn/problems/trapping-rain-water/?envType=study-plan-v2&envId=top-interview-150 go package leetcode150import ( "sort" "testing")func T 阅读全文
posted @ 2024-08-17 00:44 MoonBeautiful 阅读(16) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3