算法
文章平均质量分 50
哈哈巴泉泉
这个作者很懒,什么都没留下…
展开
-
C#高级编程——通用的排序方法
简单数据类型的冒泡排序冒泡排序是很常用的排序方法,这里我们就不多加赘述了,下面我们先看一个 int 类型数组的排序方法。代码如下: public static void IntSort(int[] array) { bool swapped; do { swapped = false; fo原创 2016-10-11 11:35:34 · 625 阅读 · 0 评论 -
LeetCode OJ 刷题日记 —— Longest Substring Without Repeating Characters
首先上题目: Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”, with the length of 1. Given “pwwkew”, the answer is “wke”, with the leng原创 2016-08-02 11:11:04 · 346 阅读 · 0 评论 -
LeetCode OJ 刷题日记——ZigZag Conversion
由于这只是我个人用来记录自己刷过的OJ题目,所以一般不会详细的去解释。ZigZag Conversion“PAYPALISHIRING”是以一个给定的行数,以Zigzag(即循环对角线结构)写出来的一个字符串: 然后,我们逐行的读,会得到这一个字符串:”PAHNAPLSIIGYIR”。使用下面这个方法,将一个给定行数的字符串以上面这种方式转换。string convert(string text原创 2016-10-17 22:34:03 · 464 阅读 · 0 评论