摘要: 栈 import java.util.Stack; public class StackExample { public static void main(String[] args) { Stack stack = new Stack<>(); // 入栈操作 stack.push(10); st 阅读全文
posted @ 2025-02-08 21:58 吉尼泰梅 阅读(7) 评论(0) 推荐(0)
摘要: 数组 public class ArrayExample { public static void main(String[] args) { // 声明并初始化一个包含 5 个整数的数组 int[] array = new int[5]; // 给数组元素赋值 array[0] = 10; arr 阅读全文
posted @ 2025-02-08 21:57 吉尼泰梅 阅读(8) 评论(0) 推荐(0)
摘要: 链表 // 定义链表节点类 class Node { int data; Node next; public Node(int data) { this.data = data; this.next = null; } } // 定义链表类 class LinkedList { private No 阅读全文
posted @ 2025-02-08 21:57 吉尼泰梅 阅读(10) 评论(0) 推荐(0)