链接:https://leetcode-cn.com/problems/ji-qi-ren-de-yun-dong-fan-wei-lcof/ 思路: dfs 代码: class Solution { public: int get_single_sum(int x) { int s= 0; whi ...
分类:
其他好文 时间:
2020-02-19 16:51:16
阅读次数:
68
该题目是Leetcode.17 [电话号码的字母组合](https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number)给定一个仅包含数字2-9的字符串,返回所有它能表示的字母组合。给出数字到字母的映射如下(与电话按键相同... ...
分类:
其他好文 时间:
2020-02-19 15:27:39
阅读次数:
88
1. 原题链接:https://leetcode.com/problems/copy list with random pointer/ 2. 解题思路 2.1 映射表 1. 建立新旧节点之间的映射表:old new,来解决复制random指针 2.2 克隆链表 1. 创建一个包含新节点的克隆链表: ...
分类:
其他好文 时间:
2020-02-19 13:12:15
阅读次数:
55
题目1 121. 买卖股票的最佳时机I: 链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 如果你最多只允许完成一笔交易(即买入和卖出一支股票), ...
分类:
其他好文 时间:
2020-02-19 05:45:29
阅读次数:
89
题目:给定一个数组,它的第 i 个元素是一支给定的股票在第 i 天的价格。设计一个算法来计算你所能获取的最大利润。你最多可以完成 两笔 交易。注意: 你不能同时参与多笔交易(你必须在再次购买前出售掉之前的股票)。链接:https://leetcode-cn.com/problems/best-tim ...
分类:
其他好文 时间:
2020-02-18 20:50:03
阅读次数:
69
[toc] ? 1200. 最小绝对差 描述 ? 897. 递增顺序查找树 描述 解答 cpp my dont compile pass: 指针问题? output: fuck ptr py ? 183. 从不订购的客户 https://leetcode cn.com/problems/custom ...
分类:
其他好文 时间:
2020-02-18 16:43:53
阅读次数:
82
原题链接在这里:https://leetcode.com/problems/dice-roll-simulation/ 题目: A die simulator generates a random number from 1 to 6 for each roll. You introduced a ...
分类:
其他好文 时间:
2020-02-18 14:53:26
阅读次数:
60
原题链接在这里:https://leetcode.com/problems/elimination-game/ 题目: There is a list of sorted integers from 1 to n. Starting from left to right, remove the fi ...
分类:
其他好文 时间:
2020-02-18 09:56:29
阅读次数:
79
原题链接在这里:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/ 题目: Given a string s, a k duplicate removal consists of choosing k ...
分类:
其他好文 时间:
2020-02-18 09:50:48
阅读次数:
75
原题链接在这里:https://leetcode.com/problems/all-paths-from-source-to-target/ 题目: Given a directed, acyclic graph of N nodes. Find all possible paths from no ...
分类:
其他好文 时间:
2020-02-18 09:41:25
阅读次数:
63