数据结构可视化工具

提示:文章

文章目录

前言

前期疑问:

本文目标:


一、背景

有个数据结构可视化的网址

https://pythontutor.com/render.html#mode=display

二、

2.1

使用pythontutor工具,一打开一个页面看到一个demo,记录一下

cpp 复制代码
#include <iostream>
2	
3	int main() {
4	  int* x = new int[3];
5	  x[1] = 20;
6	  int* p = &x[1]; // pointer into middle
7	  const char** fruit = new const char*[3];
8	  fruit[1] = "bananas";
9	  std::cout << "Yum " << *p << " " << fruit[1];
10	  return 0;
11	}

自己写了个demo

cpp 复制代码
int main() {
  // std::vector<int> vec;
  // vec.push(1);
  // vec.push(2);
  // vec.push(3);
  int c = 0;
  char test[3] = {'\0'};
  char test2[3] = {'a'};
  int array1[3] = {0};
  int array2[3] = {2};
  char ayyay[] = {1, 7, 11, 9, 44};
  int* p = (int*)malloc(5 * sizeof(int));
  return 0;
}

有以下疑问,

难道是array2先入栈的,看是array2地址最大。

array[]没有将5个值全部存储,是系统有自己的处理吗?

函数名会存在栈中吗?

2.2

三、

3.1


总结

未完待续

相关推荐
沉默-_-1 天前
力扣hot100滑动窗口(C++)
数据结构·c++·学习·算法·滑动窗口
漫随流水1 天前
leetcode回溯算法(78.子集)
数据结构·算法·leetcode·回溯算法
全栈游侠1 天前
数据结构 - 链表
数据结构·链表
一生只为赢1 天前
通俗易懂:ARM指令的寻址方式(三)
运维·arm开发·数据结构·嵌入式实时数据库
踢足球09291 天前
寒假打卡:2026-01-24
数据结构·算法
tobias.b2 天前
408真题解析-2010-9-数据结构-折半查找的比较次数
java·数据结构·算法·计算机考研·408真题解析
im_AMBER2 天前
Leetcode 105 K 个一组翻转链表
数据结构·学习·算法·leetcode·链表
sin_hielo2 天前
leetcode 1877
数据结构·算法·leetcode
睡不醒的kun2 天前
定长滑动窗口-基础篇(2)
数据结构·c++·算法·leetcode·职场和发展·滑动窗口·定长滑动窗口
txzrxz2 天前
单调栈详解(含题目)
数据结构·c++·算法·前缀和·单调栈