• YINGJUE
  • Archives
  • Categories
  • Tags
  • Authors
剑指 Offer 第3题:数组中重复的数字
2024-07-03 14:18 2024-07-03 14:18 Apple Interview
  • Data Structure
  • Algorithm

题目:在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请 …

More
剑指Offer专项突破版第24题:反转链表
2024-06-24 14:00 2024-06-24 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定单链表的头节点 head ,请反转链表,并返回反转后的链表的头节点。

示例 1: reverse list 1

// 输入:head = [1,2,3,4,5]
// 输出:[5,4,3,2,1]

示例 2: reverse list 2

// 输入:head = [1,2]
// 输出:[2,1]

示例 3:

// 输 …

More
剑指Offer专项突破版第22题:链表中环的入口节点
2024-06-22 14:00 2024-06-22 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定一个链表,返回链表开始入环的第一个节点。 从链表的头节点开始沿着 next 指针进入环的第一个节点为环的入口节点。如果链表无环,则返回 null。

为了 …

More
剑指Offer专项突破版第21题:删除倒数第k个结点
2024-06-21 14:00 2024-06-21 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。

示例 1:

// 输入:head = [1,2,3,4,5], n = 2
// 输出:[1,2,3,5]

示例 2:

// 输入:head = [1], n = 1
// 输出:[]

示例 3:

// 输 …

More
剑指Offer专项突破版第20题:回文子字符串的个数
2024-06-20 14:00 2024-06-20 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定一个字符串 s ,请计算这个字符串中有多少个回文子字符串。具有不同开始位置或结束位置的子串,即使是由相同的字符组成,也会被视作不同的 …

More
剑指Offer专项突破版第19题:最多删除一个字符得到回文
2024-06-19 14:00 2024-06-19 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定一个非空字符串 s,请判断如果 最多 从字符串中删除一个字符能否得到一个回文字符串。

示例 1:

// 输入: s = "aba"
// 输出: true

示例 2:

// 输入: s = "abca"
// 输出: true
// 解释: 可 …

More
剑指Offer专项突破版第18题:有效的回文
2024-06-18 14:00 2024-06-18 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定一个字符串 s ,验证 s 是否是 回文串 ,只考虑字母和数字字符,可以忽略字母的大小写。本题中,将空字符串定义为有效的 回文串 。

示例 1:

// 输入: s = "A man …

More
剑指Offer专项突破版第17题:包含所有字符的最短字符串
2024-06-17 14:00 2024-06-17 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定两个字符串 s 和 t 。返回 s 中包含 t 的所有字符的最短子字符串。如果 s 中不存在符合条件的子字符串,则返回空字符串 "" 。

如果 s 中存在多个符合 …

More
剑指Offer专项突破版第15题:字符串中的所有变位词
2024-06-15 14:00 2024-06-15 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定两个字符串 s 和 p,找到 s 中所有 p 的 变位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。

变位词 指字母相同,但排列不同的字符串 …

More
剑指Offer专项突破版第14题:字符串中的变位词
2024-06-14 14:00 2024-06-14 14:00 Apple Interview
  • Data Structure
  • Algorithm

题目:给定两个字符串 s1 和 s2,写一个函数来判断 s2 是否包含 s1 的某个变位词。换句话说,第一个字符串的排列之一是第二个字符串的 子串 。

示例 1:

// 输入: s1 = "ab …

More
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • »
  • Categories

    • Android
    • Interview
    • iOS
    • Misc
    • Reverse Engineering
    • Web
  • Tags

    php
    slim
    ida pro
    unicorn
    cocoapods
    macos
    spotlight
    android
    fastboot
    miui
    bootstrap5
    jailbreak
    palera1n
    socks5
    shadowsock
    data structure
    algorithm
    markdown
    logcat
    android app
    frida
    kotlin
    linux
    charles
    aosp
    c++
    arm
    unicode
    smartpointer
    docker
    classloader
    progressbar
    java
    git
    github
    7z
    code
    page
    instrumentation
  • Recent Articles

    • Learn PHP: keywords such as declare,use,require
    • Learn Slim Skeleton
    • Unicorn使用笔记(一):安装
    • 如何安装cocoapods
    • 禁止Spotlight对外部磁盘建立索引
  • Links

    • Pelican
    • Python.org
    • Jinja2

© 2025 YINGJUE