GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PythonBasic/leetcode_array/main.md at master · daacheng/PythonBasic

Expand file tree

/

main.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
64 lines (60 loc) · 3.19 KB
/

main.md

Copy path

File metadata and controls

64 lines (60 loc) · 3.19 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

LeetCode数组

1.定义

数组是一种线性表数据结构,它用一组连续的内存空间,来存储一组具有相同类型的数据。

连续内存空间保证了数组的“随机访问”特性,根据下标随机访问数组中元素的时间复杂度为O(1),同样为了保证内存空间的连续,插入与删除元素都会导致大量元素被迫移动,影响效率,时间复杂度为O(n)。

数组,链表,队列,栈都是线性表结构(线性表结构可分为顺序存储结构和链式存储结构),二叉树,堆,图属于非线性结构。

2.题目

  • 搜索插入位置(二分查找)
  • 移除元素(快慢指针)
  • 长度最小的子数组(滑动窗口)
  • 螺旋矩阵II
  • 三数之和(左右指针)
  • 四数之和
  • 反转字符串(双指针)
  • 反转字符串II
  • 替换空格
  • 翻转字符串里的单词
  • 左旋转字符串
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.