上一页 1 ··· 6 7 8 9 10
摘要: Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 51056 Accepted: 21551 Description Flip game is played on a rectangular 4x4 field 阅读全文
posted @ 2018-07-07 14:59 特务依昂 阅读(787) 评论(2) 推荐(1) 编辑
摘要: After the data structures exam, students lined up in the cafeteria to have a drink and chat about how much they have enjoyed the exam and how good the 阅读全文
posted @ 2018-07-06 12:28 特务依昂 阅读(443) 评论(0) 推荐(1) 编辑
摘要: AbdelKader enjoys math. He feels very frustrated whenever he sees an incorrect equation and so he tries to make it correct as quickly as possible! Giv 阅读全文
posted @ 2018-07-06 11:16 特务依昂 阅读(273) 评论(0) 推荐(1) 编辑
摘要: In this problem, subarray is defined as non-empty sequence of consecutive elements. We define a subarray as Super Subarray if the summation of all ele 阅读全文
posted @ 2018-06-05 18:08 特务依昂 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 数据结构中图有多种存储结构,这里我就来说其中较简单的两种,邻接矩阵以及邻接表。 邻接矩阵:用一个n*n的矩阵来表示一张图,矩阵的横纵坐标均表示图的点,例如矩阵第i行第j列数字为1,在无向图中表示点i与点j之间有一条连线,而在有向图中表示在图中有一条由i指向j的边。这个点数字为几,代表有几条边。 邻接 阅读全文
posted @ 2018-06-05 17:37 特务依昂 阅读(5683) 评论(0) 推荐(0) 编辑
摘要: 二叉树的定义:二叉树是每个结点最多有两个子树的有序树。 下面的代码内容主要包括二叉树的建立,判断二叉树是否为空树,二叉树的先序遍历,中序遍历,后序遍历以及层次遍历,计算总结点个数,叶子节点个数,树的深度。 先序遍历(根左右):先访问一个节点的根,再访问其左子树,接着右子树,通过递归的方法。 中序遍历 阅读全文
posted @ 2018-06-05 17:17 特务依昂 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 数据结构的实验,栈和队列的实现。 栈的特点:先进后出,类似于一个只有一个口子,且一次只能容一个物体通过的容器,放在上面的物体必须先拿出才能拿下面的。 队列的特点:先进先出,类似于火车通过隧道,先进入隧道的先出隧道,切只能从隧道一边进入,一边出去。 我下面用的是链式结构来实现。 首先是栈的代码: 接着 阅读全文
posted @ 2018-06-05 16:59 特务依昂 阅读(419) 评论(0) 推荐(0) 编辑
摘要: You are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold. Initially you are i 阅读全文
posted @ 2018-05-03 18:20 特务依昂 阅读(201) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10