![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构&&算法
sinse_
这个作者很懒,什么都没留下…
展开
-
字符串的最大公因子
题目要求的是求最大公因数,想当然地写成了最小公因数,实在是太菜了。可以使用辗转相除法求最大公因数。 public int gcd(int a,int b){ while(b!=0){ int temp = b; b = a%b; a = temp; } return a;...转载 2020-03-13 11:12:08 · 397 阅读 · 0 评论 -
【读取具有特定格式的文件】
Create a table named Quiz within a database called ExamDB. You should use the embedded Java DB mode to implement this database.Data is stored in a text file in the following csv format (questionNumb...原创 2019-10-29 09:52:15 · 206 阅读 · 0 评论 -
java实现栈(Stack)数据结构
Stack.java(Java有自带的栈结构,不要用这个了)package com.zx.match;import java.util.ArrayList;import java.util.List;/** * @author 作者 * @version 创建时间:2019年10月20日 下午10:05:41 * @email zxiao@stu.ouc.edu.cn 类说明...原创 2019-10-22 09:45:48 · 149 阅读 · 0 评论 -
【三个枪手问题】谁是最伟大的软件开发工程师?
Once upon a time in the land of Asgard there lived 3 wizards Gandalf, Merlin and Dumbledore. These 3 wizards often had an argument over which one of them was thegreatest software developer of all time...原创 2019-10-20 20:20:12 · 575 阅读 · 9 评论 -
【翻牌游戏】源码
Remember the concentration game that you mighthave played as a kid with some cards. The idea of the game is to find identical pairs among a shuffled pack of cards laidout. For example, let us assume t...原创 2019-10-16 21:27:18 · 1001 阅读 · 0 评论 -
贪心算法
哈夫曼编码+最小生成树+地杰斯特拉算法 都基于贪心算法实现。原创 2018-03-23 21:28:23 · 172 阅读 · 0 评论