随笔分类 -  leetcode刷题

摘要:1.牛客网上一道题: 已知一个栈的入栈序列是mnxyz,则不可能出现的出栈顺序是? A. mnxyz B. xnyzm C. nymxz D. nmyzx 答案是C。 可能我脑子比较笨吧,看来看去,感觉没看懂这类题型的意思。 因为我们都知道栈(stack)其实就是跟弹夹一样,子弹是往下压进去的,你如 阅读全文
posted @ 2020-05-29 16:12 Parachute黑喵 阅读(2469) 评论(0) 推荐(1)
摘要:1.原题: https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/submissions/ Given a string s formed by digits ('0' - '9') and '#' 阅读全文
posted @ 2020-01-07 15:08 Parachute黑喵 阅读(246) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/range-sum-of-bst/ Given the root node of a binary search tree, return the sum of values of all nodes with value be 阅读全文
posted @ 2020-01-06 09:26 Parachute黑喵 阅读(219) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/ Given an integer n, return any array containing n unique integers such that 阅读全文
posted @ 2020-01-02 08:46 Parachute黑喵 阅读(254) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/minimum-time-visiting-all-points/ On a plane there are n points with integer coordinates points[i] = [xi, yi]. You 阅读全文
posted @ 2020-01-01 19:35 Parachute黑喵 阅读(226) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/split-a-string-in-balanced-strings/ Split a String in Balanced Strings: Balanced strings are those who have equal 阅读全文
posted @ 2019-12-31 14:54 Parachute黑喵 阅读(175) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/find-numbers-with-even-number-of-digits/ Given an array nums of integers, return how many of them contain an even 阅读全文
posted @ 2019-12-24 16:52 Parachute黑喵 阅读(274) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ Given an integer number n, return the difference between the 阅读全文
posted @ 2019-12-17 15:57 Parachute黑喵 阅读(257) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/jewels-and-stones/ You're given strings J representing the types of stones that are jewels, and S representing the 阅读全文
posted @ 2019-12-17 10:59 Parachute黑喵 阅读(218) 评论(0) 推荐(0)
摘要:1.原题: https://leetcode.com/problems/defanging-an-ip-address/ 这道题本身很简单, Given a valid (IPv4) IP address, return a defanged version of that IP address. 阅读全文
posted @ 2019-12-17 09:57 Parachute黑喵 阅读(417) 评论(0) 推荐(0)
摘要:Convert Binary Number in a Linked List to Integer这道题在leetcode上面算作是“easy”,然而小生我还是不会做,于是根据大佬的回答来整理一下思路以便日后复习。 https://leetcode.com/problems/convert-bina 阅读全文
posted @ 2019-12-17 09:00 Parachute黑喵 阅读(295) 评论(0) 推荐(0)