摘要: Queue 队列(Queue)是一种经常使用的集合。Queue实际上是实现了一个先进先出(FIFO:First In First Out)的有序表。它和List的区别在于,List可以在任意位置添加和删除元素,而Queue只有两个操作: 把元素添加到队列末尾; 从队列头部取出元素。 1、add()和 阅读全文
posted @ 2024-11-01 14:59 dwhere 阅读(88) 评论(0) 推荐(0)
摘要: 使用两个栈实现先入先出队列 阅读全文
posted @ 2024-11-01 11:31 dwhere 阅读(23) 评论(0) 推荐(0)
摘要: 二叉树的递归遍历(前、中、后序) 阅读全文
posted @ 2024-10-31 21:11 dwhere 阅读(48) 评论(0) 推荐(0)
摘要: 两个链表的第一个公共结点(相交链表) 阅读全文
posted @ 2024-10-31 19:37 dwhere 阅读(22) 评论(0) 推荐(0)
摘要: 以字符串的形式读入两个数字,编写一个函数计算它们的和,以字符串形式返回。 阅读全文
posted @ 2024-10-31 17:08 dwhere 阅读(29) 评论(0) 推荐(0)
摘要: 验证输入的字符串是否是有效的 IPv4 或 IPv6 地址 阅读全文
posted @ 2024-10-31 11:32 dwhere 阅读(35) 评论(0) 推荐(0)
摘要: 查找字符串数组中的最长公共前缀 阅读全文
posted @ 2024-10-31 11:26 dwhere 阅读(46) 评论(0) 推荐(0)
摘要: 字符串相关编程题 阅读全文
posted @ 2024-10-29 13:44 dwhere 阅读(52) 评论(0) 推荐(0)