
算法与数据结构
文章平均质量分 90
CliuGeek
make the world to be a better place
展开
-
冒泡排序、快速排序(递归&非递归)、堆排序算法比较浅析
最近算法老师让大家抓紧时间完成算法作业,总共四个题目。这几个题目都很不错,我计划着把这四个作业写成四篇博客,一是可以记录下来供大家分享学习,二是可以提升自己对于这几个算法的理解。 任务要求:实现排序类,公共函数包括冒泡排序、快速排序(递归)、堆排序。将递归算法改写为非递归的,进行比较。原创 2017-11-28 19:18:04 · 2885 阅读 · 2 评论 -
拼写错误检测(动态规划法)
任务要求:以第2题中的哈希表英语词典为基础,应用动态规划法设计和实现拼写错误检测程序。 对输入单词进行检测,如果不正确,给出最接近的3个可选词。原创 2017-12-08 11:56:51 · 4185 阅读 · 1 评论 -
实现OPEN 哈希表模板类
存在的问题已按照作者自己的思路进行的修改,可能还不是很完美,希望大家多多提意见。任务要求:实现OPEN 哈希表模板类(不得使用C++或JAVA自有的哈希表类)。用哈希表实现一个英语词典(1000个词,在第三个实验中使用)原创 2017-11-29 22:19:32 · 2881 阅读 · 9 评论 -
LeetCode刷题:第13题Roman to Integer
开始本周的刷题~ **题目要求:**Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.拼写规则:要想了解如何解决这个问题,我们第一步肯定要了解罗马数字的编码规则,这里有一条关于编码规则的超链,拿去不谢。但...原创 2018-03-06 21:56:01 · 312 阅读 · 0 评论 -
LeetCode刷题:第1题Two Sum
听从老姐的建议,开始在LeetCode上刷题,争取每周能保质保量的完成2到3道题,针对有技巧的题目,我会以博客的形式将其中的原理以及各种算法都展现出来。所有题目请参考我的GitHub:GitHub地址 **题目要求:**Given an array of integers, return indices of the two numbers such that they ad...原创 2018-02-28 10:18:18 · 409 阅读 · 0 评论 -
LeetCode刷题:第9题PalindromeNumber
正月十六,这个年算是彻底过完了,也该开始干活了。在LeetCode上做的第二道题,详细内容如下: **题目要求:**Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negative in...原创 2018-03-03 11:12:00 · 323 阅读 · 0 评论 -
LeetCode刷题:第12题Integer to Roman
题目之前就完成了,今天补博客~ 由于种种原因,以后的LeetCode刷题虽然会继续,但是对于过于简单的题,我不会再以博客的形式展现了,我会把每次做的题都提交到Github上,地址如下:GitHub地址 **题目要求:**Given an integer, convert it to a roman numeral.Input is guaranteed to be ...原创 2018-03-10 21:04:13 · 345 阅读 · 0 评论