avatar
Articles
111
Tags
45
Categories
7

Home
Archives
Tags
Categories
About
Yuchen You
Search
Home
Archives
Tags
Categories
About

Yuchen You

1. 时间复杂度
Updated2026-03-26|eecs281|algorithm•structure
O(1) 常见的就是直接访问一个数组中某个元素的内容 这种算法一般不会受到输入数据大小的影响 1return array[i]; O(n) 线性时间复杂度,一般是遍历一阶数组中的所有元素 这会随着输入数据量的大小线性增大 O(log n) 对数时间复杂度,一般自常见的是用在对分查找。 或者常见的 m 叉树结构我们有 O(logmn)O(log_m n)O(logm​n) 的时间复杂度 O(n log n) - 线性对数时间复杂度 归并排序或快速排序。 说明:这些排序算法在最好或平均情况下的时间复杂度为n log n。 具体的算法的时间复杂度我们会在后面的细节讲解中提及. O(n^2) - 平方时间复杂度 冒泡排序或选择排序。 说明:这类算法通常涉及双重循环,对每对输入元素都进行操作。 容易搞混的地方在于,我们看每一层循环都容易看出是 一阶复杂度,然后我们会认为直接加起来就是一阶求和还是一阶复杂度,这就不对了 冒泡排序的时间复杂度推导 从最差角度考虑,冒泡排序需要比较 + 替换相邻元素的次数是 (n−1)+⋯+1=n(n−1)2(n - 1) + \cdots + 1 = \frac{n ...
1…1112
avatar
Yuchen You (Wesley)
Articles
111
Tags
45
Categories
7
Follow Me
Announcement
This is my Blog
Recent Post
Vpn from WireGuard Impl2026-05-20
ZeRO - memory optimizations toward training trillion parameter models2026-05-20
Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve2026-05-20
ReAct + Reflexion - Reasoning Acting and Verbal Reinforcement Learning2026-05-20
Megatron-LM - Training Multi-Billion Parameter Language Models Using Model Parallelism2026-05-20
Categories
  • agentsys4
  • cs_basic25
  • cybersecurity12
  • eecs2817
  • math9
  • mlsys4
  • network1
Tags
search_engine database gpu virtual_machine cuda system_failure distributed_sys p_np cloud_incidents jvm mlsys operating_system reasoning cyber_security agentsys chaos_system schedule memory docker memory_management llm_agent ml_training log_analysis sql structure unix container kernel llm_inference reflection network security icmp computer_composition algorithm gc java vpn Consensus tool_use
Archives
  • May 20266
  • April 20267
  • March 20262
  • January 20261
  • December 20254
  • November 20253
  • October 20255
  • September 202516
Info
Article :
111
UV :
PV :
Last Update :
©2020 - 2026 By Yuchen You (Wesley)
Framework Hexo|Theme Butterfly
welcome to my blog!
Search
Loading the Database