摘要: #include <iostream> #include <stdlib.h> #include <time.h> #include <stdio.h> using namespace std; class ErLingSiBa { private: int Map[4][4], tmp[4][4] 阅读全文
posted @ 2019-02-20 22:59 丧心病狂工科女 阅读(392) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/squares-of-a-sorted-array/ Given an array of integers A sorted in non-decreasing order, return an array of the squares o 阅读全文
posted @ 2019-02-20 22:57 丧心病狂工科女 阅读(175) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/add-digits/ Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Example 阅读全文
posted @ 2019-02-20 22:51 丧心病狂工科女 阅读(90) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/number-of-segments-in-a-string/ Count the number of segments in a string, where a segment is defined to be a contiguous 阅读全文
posted @ 2019-02-20 22:35 丧心病狂工科女 阅读(111) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/unique-morse-code-words/ International Morse Code defines a standard encoding where each letter is mapped to a series of 阅读全文
posted @ 2019-02-20 22:27 丧心病狂工科女 阅读(134) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/to-lower-case/ Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercas 阅读全文
posted @ 2019-02-20 22:09 丧心病狂工科女 阅读(164) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/rotated-digits/ X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that 阅读全文
posted @ 2019-02-20 22:02 丧心病狂工科女 阅读(181) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/detect-capital/ Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage 阅读全文
posted @ 2019-02-20 21:38 丧心病狂工科女 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/ransom-note/ Given an arbitrary ransom note string and another string containing letters from all the magazines, write a 阅读全文
posted @ 2019-02-20 21:20 丧心病狂工科女 阅读(137) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/reverse-linked-list-ii/ Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. 阅读全文
posted @ 2019-02-20 21:10 丧心病狂工科女 阅读(118) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/reorder-list/ Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify th 阅读全文
posted @ 2019-02-20 15:32 丧心病狂工科女 阅读(100) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/k-diff-pairs-in-an-array/ Given an array of integers and an integer k, you need to find the number of unique k-diff pair 阅读全文
posted @ 2019-02-20 14:37 丧心病狂工科女 阅读(101) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/partition-list/ Given a linked list and a value x, partition it such that all nodes less than x come before nodes greate 阅读全文
posted @ 2019-02-20 14:02 丧心病狂工科女 阅读(91) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/problem/HRBUST-1955 9 * 9 的 Sudoku 给每个格子标号 num 并且通过标号唯一确定格子的位置在 num / 9 行 num % 9 列 判断待定数字是不是在每行每列每宫中没有出现过 如果可以顺利搜索完所有格子 ans 标为 1 如 阅读全文
posted @ 2019-02-20 12:21 丧心病狂工科女 阅读(261) 评论(0) 推荐(0) 编辑