From 383333d409b350d2f184eb1022c83e43ff2c05ee Mon Sep 17 00:00:00 2001 From: EvsChen Date: Tue, 24 Sep 2019 00:51:20 -0400 Subject: [PATCH] Add quiver note exporter and anki card generator --- ankiCards.txt | 12 + lcNotes.json | 1 + lib/ankiGenerator.js | 50 + lib/ankiGenerator.js.map | 1 + lib/ankiGenerator.ts | 53 + lib/cli.js | 20 +- lib/exporter.js | 131 ++ lib/exporter.js.map | 1 + lib/exporter.ts | 139 ++ lib/global.d.ts | 28 + package.json | 1 + tsconfig.json | 9 + yarn.lock | 3954 ++++++++++++++++++++++++++++++++++++++ 13 files changed, 4399 insertions(+), 1 deletion(-) create mode 100644 ankiCards.txt create mode 100644 lcNotes.json create mode 100644 lib/ankiGenerator.js create mode 100644 lib/ankiGenerator.js.map create mode 100644 lib/ankiGenerator.ts create mode 100644 lib/exporter.js create mode 100644 lib/exporter.js.map create mode 100644 lib/exporter.ts create mode 100644 lib/global.d.ts create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/ankiCards.txt b/ankiCards.txt new file mode 100644 index 00000000..e88b82d2 --- /dev/null +++ b/ankiCards.txt @@ -0,0 +1,12 @@ +10
10. Regular Expression Matching
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
Note:
  s could be empty and contains only lowercase letters a-z.
  p could be empty and contains only lowercase letters a-z, and characters like . or *.
Example 1:
Input:
s = "aa"
p = "a"
Output: false
Explanation: "a" does not match the entire string "aa".
Example 2:
Input:
s = "aa"
p = "a*"
Output: true
Explanation: '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".
Example 3:
Input:
s = "ab"
p = ".*"
Output: true
Explanation: ".*" means "zero or more (*) of any character (.)".
Example 4:
Input:
s = "aab"
p = "c*a*b"
Output: true
Explanation: c can be repeated 0 times, a can be repeated 1 time. Therefore, it matches "aab".
Example 5:
Input:
s = "mississippi"
p = "mis*is*p*."
Output: false
Use 2d dynamic programming, where dp[i][j] represents whether s[:i] and p[:j] match each other. Matrix size is one more than the length of str and pattern to handle boudary conditions.
+4
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
You may assume nums1 and nums2 cannot be both empty.
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]
The median is (2 + 3)/2 = 2.5
Binary search in the longer array. Watch for corner cases and the start and end of search range.
+15
15. 3Sum
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-1, -1, 2]
]
Sort first. Use two pointers to approach to the middle. Use a while loop to avoid repetitive solution.
+42
42. Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image!
Example:
Input: [0,1,0,2,1,0,1,3,2,1,2,1]
Output: 6
Three methods can be used to solve this problem. And all three can be done within linear time.
1. Using stack. We are tring to catch the 'V' pattern in the histogram. And a stack is used to store the left side of 'V'. We ignore the case when decreasing or increasing when stack is empty. For the other cases, the water that a column can retain is calculated by the vertical bar formed with the left bounds that are smaller than it.
2. Dynamic programming. Suppose you're standing on one of the bar. Look left, the highest bar is maxleft[i]. The maxright[i] is defined the same. The water that can finally be "stored" on top of the bar is decided by the minimum of the left/right boundary. So we store the maxleft and maxright at each bar. And accumulate the value by using min(left, right) - height[i].
3. Method 2 can be optimized by only using constant space and two pointers. Use maxleft and maxright to store the maximum up to now. When height[left] < height[right], height[left] is able to keep water if maxleft > height[left]. So we accululate the maxleft - height[left] each time. Same for the right side.
+1
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
Use hash to search for another number
+70
70. Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Note: Given n will be a positive integer.
Example 1:
Input: 2
Output: 2
Explanation: There are two ways to climb to the top.
1. 1 step + 1 step
2. 2 steps
Example 2:
Input: 3
Output: 3
Explanation: There are three ways to climb to the top.
1. 1 step + 1 step + 1 step
2. 1 step + 2 steps
3. 2 steps + 1 step
Dynamic programming
+48
48. Rotate Image
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Note:
You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
Example 1:
Given input matrix =
[
[1,2,3],
[4,5,6],
[7,8,9]
],
rotate the input matrix in-place such that it becomes:
[
[7,4,1],
[8,5,2],
[9,6,3]
]
Example 2:
Given input matrix =
[
[ 5, 1, 9,11],
[ 2, 4, 8,10],
[13, 3, 6, 7],
[15,14,12,16]
],
rotate the input matrix in-place such that it becomes:
[
[15,13, 2, 5],
[14, 3, 4, 1],
[12, 6, 8, 9],
[16, 7,10,11]
]
1. Dealing four symmtric points at a time. Cycle between the four
2. Transpose and reverse row
+2
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
Example:
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8
Explanation: 342 + 465 = 807.
Use a carrier and dummy head
+5
5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example 1:
Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.
Example 2:
Input: "cbbd"
Output: "bb"
Expand from center.
+46
46. Permutations
Given a collection of distinct integers, return all possible permutations.
Example:
Input: [1,2,3]
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
Recursive solution. For a list nums, and a permutation functin permute(), the whole set of permutation can be considered as:
- \([nums[0], permute(nums[1:])]\)
- \([nums[1], permute(nums[0] + nums[2:])]\)
- \([nums[2], permute(nums[0, 1] + nums[3:])]\)
So we swap the \(i\)th number of the list with the begin, and then permute the rest. If begin is equal to len(nums) - 1, we'll create a copy of the list and push it into the result.
Since a list of length \(N\) has \(N!\) permutations, the time complexity must be \(O(N!)\). Clearly the space complexity is \(O(1)\).
+49
49. Group Anagrams
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
  All inputs will be in lowercase.
  The order of your output does not matter.
The key is find a way to store the number that each letter appears. Different data structures will be used in different languages
1. For python, we could use a defaultlist(dict) with tuple of length 26 as the key
2. For cpp, we could use a string of counts separated by '#' as the key
+72
72. Edit Distance
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on a word:
  Insert a character
  Delete a character
  Replace a character
Example 1:
Input: word1 = "horse", word2 = "ros"
Output: 3
Explanation:
horse -> rorse (replace 'h' with 'r')
rorse -> rose (remove 'r')
rose -> ros (remove 'e')
Example 2:
Input: word1 = "intention", word2 = "execution"
Output: 5
Explanation:
intention -> inention (remove 't')
inention -> enention (replace 'i' with 'e')
enention -> exention (replace 'n' with 'x')
exention -> exection (replace 'n' with 'c')
exection -> execution (insert 'u')
This problem is solved by dynamic programming. Consider two words, w1 with length l1 and w2 with length l2. We use a matrix of size (l1 + 1) * (l2 + 1), with each cell dp[i][j] representing the minimum number of operations to transform the first i letters of w1 to first j letters of w2. We offset the number of rows and columns by 1 to represent the empty string.
Notice that when iterating through each row of the matrix, we are only using the cells in the row above and one cell before. So it is possible to optimize the space usage to only an 1-D array of size min(l1, l2), since the count of operations from is symmetric for w1 and w2.
diff --git a/lcNotes.json b/lcNotes.json new file mode 100644 index 00000000..07558725 --- /dev/null +++ b/lcNotes.json @@ -0,0 +1 @@ +{"problems":[{"index":295,"title":"Find Median from Data Stream","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(log(N))$ and $O(1)$","space":"$O(N)$","code":"from heapq import *\n\nclass MedianFinder:\n\n def __init__(self):\n \"\"\"\n initialize your data structure here.\n \"\"\"\n # max heap\n self.left = []\n # min heap\n self.right = []\n\n def addNum(self, num: int) -> None:\n # Balance the heap\n heappush(self.right, -heappushpop(self.left, -num))\n # Keep the size of left either equal or at worst greater than 1\n if len(self.left) < len(self.right):\n heappush(self.left, -heappop(self.right))\n\n def findMedian(self) -> float:\n if len(self.left) > len(self.right):\n return -self.left[0]\n return (-self.left[0] + self.right[0]) / 2","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/find-median-from-data-stream/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.\r\nFor example,\r\n\r\n[2,3,4], the median is 3\r\n\r\n[2,3], the median is (2 + 3) / 2 = 2.5\r\n\r\nDesign a data structure that supports the following two operations:\r\n\r\n\r\n\tvoid addNum(int num) - Add a integer number from the data stream to the data structure.\r\n\tdouble findMedian() - Return the median of all elements so far.\r\n\r\n\r\n \r\n\r\nExample:\r\n\r\n\r\naddNum(1)\r\naddNum(2)\r\nfindMedian() -> 1.5\r\naddNum(3) \r\nfindMedian() -> 2\r\n\r\n\r\n \r\n\r\nFollow up:\r\n\r\n\r\n\tIf all integer numbers from the stream are between 0 and 100, how would you optimize it?\r\n\tIf 99% of all integer numbers from the stream are between 0 and 100, how would you optimize it?\r\n\r\n"},{"index":146,"title":"LRU Cache","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(1)$","space":"$O(N)$","code":"class DLNode:\n def __init__(self, key = 0, value = 0):\n self.key = key\n self.value = value\n self.prev = None\n self.next = None\n\nclass LRUCache:\n def _add_node(self, node: DLNode):\n node.prev = self.head\n node.next = self.head.next\n self.head.next.prev = node\n self.head.next = node\n \n def _remove_node(self, node: DLNode):\n node.prev.next = node.next\n node.next.prev = node.prev\n \n def _move_to_head(self, node: DLNode):\n self._remove_node(node)\n self._add_node(node)\n \n def _pop_tail(self):\n node = self.tail.prev\n self._remove_node(node)\n return node\n \n def __init__(self, capacity: int):\n self.capacity = capacity\n self.cache = dict()\n self.head = DLNode()\n self.tail = DLNode()\n self.head.next = self.tail\n self.tail.prev = self.head\n \n def get(self, key: int) -> int:\n if key not in self.cache:\n return -1\n node = self.cache[key]\n self._move_to_head(node)\n return node.value\n\n def put(self, key: int, value: int) -> None:\n if key in self.cache:\n node = self.cache[key]\n node.value = value\n self._move_to_head(node)\n return\n \n node = DLNode(key, value)\n if len(self.cache) == self.capacity:\n tail = self._pop_tail()\n del self.cache[tail.key]\n \n self.cache[key] = node\n self._add_node(node)\n \n \n# Your LRUCache object will be instantiated and called as such:\n# obj = LRUCache(capacity)\n# param_1 = obj.get(key)\n# obj.put(key,value)","language":"python"},{"time":"$O(1)$","space":"$O(N)$","code":"class LRUCache {\npublic:\n int size;\n list lru; // MRU...LRU\n unordered_map val_map;\n unordered_map::iterator> itr_map;\n \n LRUCache(int capacity) : size(capacity) {}\n \n int get(int key) {\n if (val_map.find(key) == val_map.end()) {\n return -1;\n }\n updateKey(key);\n return val_map[key];\n }\n \n void put(int key, int value) {\n if (val_map.size() == size && val_map.find(key) == val_map.end()) {\n invalidate();\n }\n updateKey(key);\n val_map[key] = value;\n }\n \n void invalidate() {\n val_map.erase(lru.back());\n itr_map.erase(lru.back());\n lru.pop_back();\n }\n \n void updateKey(int key) {\n if (itr_map.find(key) != itr_map.end()) {\n lru.erase(itr_map[key]); \n }\n lru.push_front(key);\n itr_map[key] = lru.begin();\n }\n};","language":"cpp"}],"anki":"","Link":"https://leetcode.com/problems/lru-cache/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Test cases":"* [\"LRUCache\",\"get\",\"put\",\"get\",\"put\",\"put\",\"get\",\"get\"]\n [[2],[2],[2,6],[1],[1,5],[1,2],[1],[2]]"},"desc":"Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.\r\n\r\nget(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.\r\nput(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item.\r\n\r\nThe cache is initialized with a positive capacity.\r\n\r\nFollow up:\r\nCould you do both operations in O(1) time complexity?\r\n\r\nExample:\r\n\r\n\r\nLRUCache cache = new LRUCache( 2 /* capacity */ );\r\n\r\ncache.put(1, 1);\r\ncache.put(2, 2);\r\ncache.get(1); // returns 1\r\ncache.put(3, 3); // evicts key 2\r\ncache.get(2); // returns -1 (not found)\r\ncache.put(4, 4); // evicts key 1\r\ncache.get(1); // returns -1 (not found)\r\ncache.get(3); // returns 3\r\ncache.get(4); // returns 4\r\n\r\n\r\n \r\n"},{"index":40,"title":"Combination Sum II","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.\r\n\r\nEach number in candidates may only be used once in the combination.\r\n\r\nNote:\r\n\r\n\r\n\tAll numbers (including target) will be positive integers.\r\n\tThe solution set must not contain duplicate combinations.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: candidates = [10,1,2,7,6,1,5], target = 8,\r\nA solution set is:\r\n[\r\n [1, 7],\r\n [1, 2, 5],\r\n [2, 6],\r\n [1, 1, 6]\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: candidates = [2,5,2,1,2], target = 5,\r\nA solution set is:\r\n[\r\n  [1,2,2],\r\n  [5]\r\n]\r\n\r\n"},{"index":253,"title":"Meeting Rooms II","body":{"mySolution":[{"time":"$O(Nlog(N))$","space":"$O(N)$","code":"class Solution:\n def minMeetingRooms(self, intervals: List[List[int]]) -> int:\n start = [i[0] for i in intervals]\n end = [i[1] for i in intervals]\n start.sort()\n end.sort()\n num = max_num = 0\n p1 = p2 = 0\n # We sort the start and end time respectively in increasing order\n # Then we traverse through both lists\n # We add the number of meeting rooms by 1 for each start\n # Decrease by 1 for each end\n while p1 < len(intervals) and p2 < len(intervals):\n if start[p1] < end[p2]:\n num += 1\n p1 += 1\n elif end[p2] > start[p1]:\n num -= 1\n p2 += 1\n else:\n p1 += 1\n p2 += 1\n \n max_num = max(max_num, num)\n \n return max_num","language":""}],"optimizedSolution":[{"time":"$O(Nlog(N)$","space":"$O(N)$","code":"class Solution:\n def minMeetingRooms(self, intervals: List[List[int]]) -> int:\n start = [i[0] for i in intervals]\n end = [i[1] for i in intervals]\n start.sort()\n end.sort()\n num = 0\n p1 = p2 = 0\n # Instead of going through the entire list, we only need to go through the start time list.\n while p1 < len(intervals):\n if start[p1] >= end[p2]:\n num -= 1\n p2 += 1\n num += 1\n p1 += 1\n \n # Since the number of meeting rooms after all start time have been traversed must be the largest\n # we don't need a max_num\n return num","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/meeting-rooms-ii/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [[0, 30],[5, 10],[15, 20]]\r\nOutput: 2\r\n\r\nExample 2:\r\n\r\n\r\nInput: [[7,10],[2,4]]\r\nOutput: 1\r\n\r\nNOTE: input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.\r\n"},{"index":119,"title":"Pascal's Triangle II","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n # Use formula\n def getRow(self, rowIndex: int) -> List[int]:\n res = [1] * (rowIndex + 1)\n i = 1\n while i <= len(res) - 1 - i:\n res[i] = res[len(res) - 1 - i] = res[i - 1] * (rowIndex - i + 1) // i\n i += 1\n return res","language":"python"}],"optimizedSolution":[{"time":"$O(N^2)$","space":"$O(N)$","code":"class Solution:\n # Calculate Pascal's triangle without using extra space\n def getRow(self, rowIndex: int) -> List[int]:\n res = [0] * (rowIndex + 1)\n res[0] = 1\n for i in range(1, rowIndex + 1):\n for j in range(i, 0, -1):\n res[j] += res[j - 1]\n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/pascals-triangle-ii/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a non-negative index k where k ≤ 33, return the k^th index row of the Pascal's triangle.\r\n\r\nNote that the row index starts from 0.\r\n\r\n\r\nIn Pascal's triangle, each number is the sum of the two numbers directly above it.\r\n\r\nExample:\r\n\r\n\r\nInput: 3\r\nOutput: [1,3,3,1]\r\n\r\n\r\nFollow up:\r\n\r\nCould you optimize your algorithm to use only O(k) extra space?\r\n"},{"index":10,"title":"Regular Expression Matching","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(S * P)$","space":"$O(S * P)$","code":"class Solution:\n def isMatch(self, s: str, p: str) -> bool:\n # We use extra space here for boundary handling\n # dp[i][j] represents whether p[:i] can match s[:j]\n dp = [[False] * (len(s) + 1) for _ in range(len(p) + 1)]\n dp[0][0] = True\n # Init the first column\n for i in range(2, len(p) + 1):\n dp[i][0] = p[i - 1] == '*' and dp[i - 2][0]\n \n for i in range(1, len(p) + 1):\n for j in range(1, len(s) + 1):\n if p[i - 1] != '*':\n # For regular letters or '.', we look at the diagonal element\n dp[i][j] = dp[i - 1][j - 1] and (p[i - 1] == s[j - 1] or p[i - 1] == '.')\n else:\n # If p[i - 1] == '*', either\n # 1. '*' does not match anything, we just skip '*' and the letter before\n # 2. The letter before is the same as s[j - 1], it can match 0 or more times\n first_match = p[i - 2] == s[j - 1] or p[i - 2] == '.'\n dp[i][j] = (i > 1 and dp[i - 2][j]) or (first_match and dp[i][j - 1])\n \n return dp[len(p)][len(s)]","language":"python"}],"anki":"Use 2d dynamic programming, where `dp[i][j]` represents whether `s[:i]` and `p[:j]` match each other. Matrix size is one more than the length of str and pattern to handle boudary conditions.","Link":"https://leetcode.com/problems/regular-expression-matching/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.\n\n\n'.' Matches any single character.\n'*' Matches zero or more of the preceding element.\n\n\nThe matching should cover the entire input string (not partial).\n\nNote:\n\n\n\ts could be empty and contains only lowercase letters a-z.\n\tp could be empty and contains only lowercase letters a-z, and characters like . or *.\n\n\nExample 1:\n\n\nInput:\ns = \"aa\"\np = \"a\"\nOutput: false\nExplanation: \"a\" does not match the entire string \"aa\".\n\n\nExample 2:\n\n\nInput:\ns = \"aa\"\np = \"a*\"\nOutput: true\nExplanation: '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes \"aa\".\n\n\nExample 3:\n\n\nInput:\ns = \"ab\"\np = \".*\"\nOutput: true\nExplanation: \".*\" means \"zero or more (*) of any character (.)\".\n\n\nExample 4:\n\n\nInput:\ns = \"aab\"\np = \"c*a*b\"\nOutput: true\nExplanation: c can be repeated 0 times, a can be repeated 1 time. Therefore, it matches \"aab\".\n\n\nExample 5:\n\n\nInput:\ns = \"mississippi\"\np = \"mis*is*p*.\"\nOutput: false\n\n"},{"index":102,"title":"Binary Tree Level Order Traversal","body":{"mySolution":[{"time":"$O(N)$ where $N$ is the number of nodes","space":"$O(N)$","code":"# Definition for a binary tree node.\n# class TreeNode:\n# def __init__(self, x):\n# self.val = x\n# self.left = None\n# self.right = None\n\nclass Solution:\n def levelOrder(self, root: TreeNode) -> List[List[int]]:\n self.q = []\n self.rec(0, root)\n return self.q\n \n def rec(self, level, node):\n if not node: return\n \n if len(self.q) < level + 1:\n self.q.append([])\n \n self.q[level].append(node.val)\n self.rec(level + 1, node.left)\n self.rec(level + 1, node.right)\n","language":"python"},{"time":"$O(N)$","space":"$O(N)$","code":"from collections import deque\nclass Solution:\n def levelOrder(self, root: TreeNode) -> List[List[int]]:\n res = []\n q = deque([root, ])\n while q:\n level_res = []\n pre_len = len(q)\n for i in range(pre_len):\n n = q.popleft()\n if n:\n level_res.append(n.val)\n q.append(n.left)\n q.append(n.right)\n \n if len(level_res) > 0: res.append(level_res)\n \n return res","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/binary-tree-level-order-traversal/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).\r\n\r\n\r\nFor example:\r\nGiven binary tree [3,9,20,null,null,15,7],\r\n\r\n 3\r\n / \\\r\n 9 20\r\n / \\\r\n 15 7\r\n\r\n\r\n\r\nreturn its level order traversal as:\r\n\r\n[\r\n [3],\r\n [9,20],\r\n [15,7]\r\n]\r\n\r\n"},{"index":287,"title":"Find the Duplicate Number","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def findDuplicate(self, nums: List[int]) -> int:\n def nx(n):\n return nums[n]\n \n slow = fast = nums[0]\n \n while True:\n slow = nx(slow)\n fast = nx(nx(fast))\n if slow == fast:\n break\n \n node = nx(0)\n \n while node != fast:\n fast = nx(fast)\n node = nx(node)\n \n return fast","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/find-the-duplicate-number/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [1,3,4,2,2]\r\nOutput: 2\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [3,1,3,4,2]\r\nOutput: 3\r\n\r\nNote:\r\n\r\n\r\n\tYou must not modify the array (assume the array is read only).\r\n\tYou must use only constant, O(1) extra space.\r\n\tYour runtime complexity should be less than O(n^2).\r\n\tThere is only one duplicate number in the array, but it could be repeated more than once.\r\n\r\n"},{"index":234,"title":"Palindrome Linked List","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post my solution here, if solved successfully.","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def isPalindrome(self, head):\n rev = None\n slow = fast = head\n while fast and fast.next:\n fast = fast.next.next\n rev, rev.next, slow = slow, rev, slow.next\n if fast:\n slow = slow.next\n while rev and rev.val == slow.val:\n slow = slow.next\n rev = rev.next\n return not rev","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/palindrome-linked-list/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a singly linked list, determine if it is a palindrome.\r\n\r\nExample 1:\r\n\r\n\r\nInput: 1->2\r\nOutput: false\r\n\r\nExample 2:\r\n\r\n\r\nInput: 1->2->2->1\r\nOutput: true\r\n\r\nFollow up:\r\nCould you do it in O(n) time and O(1) space?\r\n"},{"index":212,"title":"Word Search II","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"# Got TLE for this\nclass Solution(object):\n def findWords(self, board, words):\n \"\"\"\n :type board: List[List[str]]\n :type words: List[str]\n :rtype: List[str]\n \"\"\"\n if len(words) == 0:\n return []\n if not board or not board[0]:\n return []\n\n word_set = set(words)\n res = set()\n len_list = [len(w) for w in words]\n self.max_len = max(len_list)\n for i in range(len(board)):\n for j in range(len(board[0])):\n self.helper(i * len(board[0]) + j, board, set(), [], word_set, res)\n return list(res)\n \n \n def helper(self, coord, board, history, arr, word_set, res):\n if coord in history:\n return\n history.add(coord)\n y = coord % len(board[0])\n x = coord // len(board[0])\n arr.append(board[x][y])\n current = ''.join(arr)\n if current in word_set:\n res.add(current)\n \n isPrefix = False\n for word in word_set:\n if word.startswith(current):\n isPrefix = True\n break\n \n if len(arr) < self.max_len and isPrefix:\n if x != len(board) - 1:\n self.helper((x + 1) * len(board[0]) + y, board, history, arr, word_set, res)\n if x != 0:\n self.helper((x - 1) * len(board[0]) + y, board, history, arr, word_set, res)\n if y != len(board[0]) - 1:\n self.helper(x * len(board[0]) + y + 1, board, history, arr, word_set, res)\n if y != 0:\n self.helper(x * len(board[0]) + y - 1, board, history, arr, word_set, res)\n arr.pop()\n history.remove(coord)","language":"python"}],"optimizedSolution":[{"time":"$O(M*N*4^wl)$ where wl is the average length of words in wordlist","space":"$O(V)$ number of vertices in Trie","code":"class TrieNode:\n def __init__(self):\n self.next = {}\n self.word = None\n \ndef buildTrie(words):\n root = TrieNode()\n for w in words:\n node = root\n for i in range(len(w)):\n c = w[i]\n if c not in node.next:\n node.next[c] = TrieNode()\n node = node.next[c]\n if i == len(w) - 1:\n node.word = w\n return root\n \nclass Solution:\n def findWords(self, board: List[List[str]], words: List[str]) -> List[str]:\n if not words or not board or not board[0]:\n return []\n root = buildTrie(words)\n res = []\n for i in range(len(board)):\n for j in range(len(board[0])):\n self.dfs(i * len(board[0]) + j, board, root, res)\n return res\n \n def dfs(self, coord, board, node, res):\n x = coord // len(board[0])\n y = coord % len(board[0])\n \n if board[x][y] == '#' or board[x][y] not in node.next:\n return\n \n node = node.next[board[x][y]]\n if node.word:\n res.append(node.word)\n node.word = None\n \n temp, board[x][y] = board[x][y], '#'\n if x != 0:\n self.dfs((x - 1) * len(board[0]) + y, board, node, res)\n if x != len(board) - 1:\n self.dfs((x + 1) * len(board[0]) + y, board, node, res)\n if y != len(board[0]) - 1:\n self.dfs(x * len(board[0]) + y + 1, board, node, res)\n if y != 0:\n self.dfs(x * len(board[0]) + y - 1, board, node, res)\n board[x][y] = temp\n \n","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-search-ii/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Given a 2D board and a list of words from the dictionary, find all words in the board.\r\n\r\nEach word must be constructed from letters of sequentially adjacent cell, where \"adjacent\" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.\r\n\r\n \r\n\r\nExample:\r\n\r\n\r\nInput: \r\nboard = [\r\n ['o','a','a','n'],\r\n ['e','t','a','e'],\r\n ['i','h','k','r'],\r\n ['i','f','l','v']\r\n]\r\nwords = [\"oath\",\"pea\",\"eat\",\"rain\"]\r\n\r\nOutput: [\"eat\",\"oath\"]\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\tAll inputs are consist of lowercase letters a-z.\r\n\tThe values of words are distinct.\r\n\r\n"},{"index":494,"title":"Target Sum","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"class Solution:\n def findTargetSumWays(self, nums: List[int], S: int) -> int:\n if not nums:\n return 0\n \n # Use a cache to optimize speed\n cache = [{} for _ in nums]\n max_sum = [0] * len(nums)\n max_sum[-1] = nums[-1]\n for i in range(len(nums) - 2, -1, -1):\n max_sum[i] = max_sum[i + 1] + nums[i]\n \n # Use recursion\n # Each time we change the target to be target + nums[i] and target - nums[i]\n # and move the pointer forward\n def rec(start, target):\n # Base case\n if start == len(nums) - 1:\n # Be careful when the number is 0\n if nums[start] == 0:\n return 2 if target == 0 else 0\n return int(target == nums[start] or target == -nums[start])\n \n if target in cache[start]:\n return cache[start][target]\n \n # Early return by comparing the target with the max_sum that can offer\n if target > max_sum[start] or target < -max_sum[start]:\n return 0\n \n res = rec(start + 1, target + nums[start]) + rec(start + 1, target - nums[start])\n cache[start][target] = res\n return res\n \n return rec(0, S)","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"class Solution:\n def findTargetSumWays(self, nums: List[int], S: int) -> int:\n if not nums:\n return 0\n \n cache = [{} for _ in nums]\n max_sum = [0] * len(nums)\n max_sum[-1] = nums[-1]\n for i in range(len(nums) - 2, -1, -1):\n max_sum[i] = max_sum[i + 1] + nums[i]\n \n def rec(start, target):\n # Since the result for positive and negative numbers are the same,\n # we can optimize the speed by considering only positive ones\n if target < 0:\n target = -target\n\n if start == len(nums) - 1:\n if nums[start] == 0:\n return 2 if target == 0 else 0\n return int(target == nums[start])\n \n if target in cache[start]:\n return cache[start][target]\n \n if target > max_sum[start]:\n return 0\n \n res = rec(start + 1, target + nums[start]) + rec(start + 1, target - nums[start])\n cache[start][target] = res\n return res\n \n return rec(0, S)","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/target-sum/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"\r\nYou are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.\r\n \r\n\r\nFind out how many ways to assign symbols to make sum of integers equal to target S. \r\n\r\n\r\nExample 1:\r\n\r\nInput: nums is [1, 1, 1, 1, 1], S is 3. \r\nOutput: 5\r\nExplanation: \r\n\r\n-1+1+1+1+1 = 3\r\n+1-1+1+1+1 = 3\r\n+1+1-1+1+1 = 3\r\n+1+1+1-1+1 = 3\r\n+1+1+1+1-1 = 3\r\n\r\nThere are 5 ways to assign symbols to make the sum of nums be target 3.\r\n\r\n\r\n\r\nNote:\r\n\r\nThe length of the given array is positive and will not exceed 20. \r\nThe sum of elements in the given array will not exceed 1000.\r\nYour output answer is guaranteed to be fitted in a 32-bit integer.\r\n\r\n"},{"index":973,"title":"K Closest Points to Origin","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(NlogK)$","space":"$O(K)$","code":"// TODO: using priority queue","language":"cpp"},{"time":"average $O(N)$, worst case $O(N^2)$ TODO: why average O(N)?","space":"$O(1)$","code":"// Also called quick select\nclass Solution {\npublic:\n vector> kClosest(vector>& points, int K) {\n sort(points, 0, points.size() - 1, K);\n points.resize(K);\n return points;\n }\n \n // Partially sort the first K points by randomly selecting a pivot\n void sort(vector> &points, int i, int j, int K) {\n if (i >= j) {\n return;\n }\n int pivot = rand() % (j - i) + i;\n swap(points[pivot], points[i]);\n int mid = partition(points, i, j);\n\n if (mid - i + 1 < K) {\n sort(points, mid + 1, j, K - mid + i - 1);\n }\n else if (mid - i + 1 > K) {\n sort(points, i, mid - 1, K);\n }\n }\n \n int dist(vector &point) {\n return point[0] * point[0] + point[1] * point[1];\n }\n \n // Need careful manipulation here\n int partition(vector> &points, int i, int j) {\n int pivot = dist(points[i]);\n int start = i;\n i++;\n while (true) {\n while (i <= j && dist(points[i]) <= pivot) i++;\n while (i <= j && dist(points[j]) > pivot) j--;\n if (i > j) break;\n swap(points[i], points[j]);\n }\n swap(points[start], points[j]);\n return j;\n }\n};","language":"cpp"}],"anki":"","Link":"https://leetcode.com/problems/k-closest-points-to-origin/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Test Cases":"[[-1,3],[-2,2],[2,-2]] K=2"},"desc":"We have a list of points on the plane.  Find the K closest points to the origin (0, 0).\r\n\r\n(Here, the distance between two points on a plane is the Euclidean distance.)\r\n\r\nYou may return the answer in any order.  The answer is guaranteed to be unique (except for the order that it is in.)\r\n\r\n \r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: points = [[1,3],[-2,2]], K = 1\r\nOutput: [[-2,2]]\r\nExplanation: \r\nThe distance between (1, 3) and the origin is sqrt(10).\r\nThe distance between (-2, 2) and the origin is sqrt(8).\r\nSince sqrt(8) < sqrt(10), (-2, 2) is closer to the origin.\r\nWe only want the closest K = 1 points from the origin, so the answer is just [[-2,2]].\r\n\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: points = [[3,3],[5,-1],[-2,4]], K = 2\r\nOutput: [[3,3],[-2,4]]\r\n(The answer [[-2,4],[3,3]] would also be accepted.)\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\t1 <= K <= points.length <= 10000\r\n\t-10000 < points[i][0] < 10000\r\n\t-10000 < points[i][1] < 10000\r\n\r\n\r\n"},{"index":127,"title":"Word Ladder","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N * L)$ where $N$ is the lenth of the list and $L$ is the size of word","space":"$O(N * L)$","code":"from collections import defaultdict, deque\n\nclass Solution:\n def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int:\n if endWord not in wordList:\n return 0\n \n if beginWord not in wordList:\n wordList += [beginWord]\n \n # Use the middle state as key, for example, '*og', 'h*g', 'ho*' for 'hog'\n graph = defaultdict(list)\n # Save all the middle states for one word to avoid recalculating\n states = {}\n \n for i in range(len(wordList)):\n word = wordList[i]\n states[word] = [word[:j] + '*' + word[j + 1:] for j in range(len(word))]\n for key in states[word]:\n graph[key].append(word)\n \n # Use a set to avoid revisit\n history = set()\n q = deque([(beginWord, 1)])\n \n while q:\n w, s = q.popleft()\n if w == endWord:\n return s\n history.add(w)\n for state in states[w]:\n for n in graph[state]:\n if n not in history:\n q.append((n, s + 1))\n # This step is important to avoid revisit\n graph[state] = []\n \n return 0","language":"python"},{"time":"$O(N * L)$ where $N$ is the lenth of the list and $L$ is the size of word","space":"$O(N * L)$","code":"from collections import defaultdict, deque\n\nclass Solution:\n # Bidirectional search\n def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int:\n if endWord not in set(wordList):\n return 0\n \n self.graph = defaultdict(list)\n self.states = {}\n \n for i in range(len(wordList)):\n word = wordList[i]\n self.states[word] = [word[:j] + '*' + word[j + 1:] for j in range(len(word))]\n for key in self.states[word]:\n self.graph[key].append(word)\n \n self.states[beginWord] = [beginWord[:j] + '*' + beginWord[j + 1:] for j in range(len(beginWord))]\n \n # We search from both ends\n beginq = deque([(beginWord, 1)])\n endq = deque([(endWord, 1)])\n beginhis = { beginWord: 1 }\n endhis = { endWord: 1 }\n \n while beginq or endq:\n # Return if both ends met\n ans = self.search(beginq, beginhis, endhis)\n if ans:\n return ans\n ans = self.search(endq, endhis, beginhis)\n if ans:\n return ans\n \n return 0\n \n def search(self, wordq, his, otherhis):\n if not wordq:\n return None\n w,s = wordq.popleft()\n for state in self.states[w]:\n for n in self.graph[state]:\n if n in otherhis:\n return s + otherhis[n]\n if n not in his:\n his[n] = s + 1\n wordq.append((n, s + 1))\n self.graph[state] = []\n \n return None","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-ladder/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that:\r\n\r\n\r\n\tOnly one letter can be changed at a time.\r\n\tEach transformed word must exist in the word list. Note that beginWord is not a transformed word.\r\n\r\n\r\nNote:\r\n\r\n\r\n\tReturn 0 if there is no such transformation sequence.\r\n\tAll words have the same length.\r\n\tAll words contain only lowercase alphabetic characters.\r\n\tYou may assume no duplicates in the word list.\r\n\tYou may assume beginWord and endWord are non-empty and are not the same.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\nbeginWord = \"hit\",\r\nendWord = \"cog\",\r\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\r\n\r\nOutput: 5\r\n\r\nExplanation: As one shortest transformation is \"hit\" -> \"hot\" -> \"dot\" -> \"dog\" -> \"cog\",\r\nreturn its length 5.\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\nbeginWord = \"hit\"\r\nendWord = \"cog\"\r\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\r\n\r\nOutput: 0\r\n\r\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\r\n\r\n\r\n\r\n\r\n"},{"index":75,"title":"Sort Colors","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def sortColors(self, nums: List[int]) -> None:\n \"\"\"\n Do not return anything, modify nums in-place instead.\n \"\"\"\n i = p0 = 0\n p2 = len(nums) - 1\n while i <= p2:\n if nums[i] == 0:\n nums[i], nums[p0] = nums[p0], nums[i]\n p0 += 1\n i += 1\n elif nums[i] == 2:\n nums[i], nums[p2] = nums[p2], nums[i]\n p2 -=1\n else:\n i += 1","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/sort-colors/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"I was thinking to store the last position of 0, 1 and 2 in three pointers. And rearrange them each time. But it seems that it would take more time than the two pass"},"desc":"Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.\r\n\r\nHere, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively.\r\n\r\nNote: You are not suppose to use the library's sort function for this problem.\r\n\r\nExample:\r\n\r\n\r\nInput: [2,0,2,1,1,0]\r\nOutput: [0,0,1,1,2,2]\r\n\r\nFollow up:\r\n\r\n\r\n\tA rather straight forward solution is a two-pass algorithm using counting sort.\r\n\tFirst, iterate the array counting number of 0's, 1's, and 2's, then overwrite array with total number of 0's, then 1's and followed by 2's.\r\n\tCould you come up with a one-pass algorithm using only constant space?\r\n\r\n"},{"index":581,"title":"Shortest Unsorted Continuous Subarray","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def findUnsortedSubarray(self, nums: List[int]) -> int:\n stack = []\n start = len(nums)\n end = -1\n for i in range(len(nums)):\n while stack and nums[stack[-1]] > nums[i]:\n start = min(start, stack.pop())\n stack.append(i)\n stack.clear()\n for i in range(len(nums) - 1, -1, -1):\n while stack and nums[stack[-1]] < nums[i]:\n end = max(end, stack.pop())\n stack.append(i)\n \n return 0 if end == -1 else end - start + 1","language":"python"},{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def findUnsortedSubarray(self, nums: List[int]) -> int:\n cur_max = float('-inf')\n cur_min = float('inf')\n flag = False\n for i in range(1, len(nums)):\n # As long as the array begins falling,\n # we look for the minimum element in the falling array \n if nums[i] < nums[i - 1]:\n flag = True\n if flag:\n cur_min = min(cur_min, nums[i])\n flag = False\n for i in range(len(nums) - 2, -1, -1):\n # Similarly, when looking backwards\n # We look for the maximum element in the rising array\n if nums[i] > nums[i + 1]:\n flag = True\n if flag:\n cur_max = max(cur_max, nums[i])\n end = start = -1\n # Then we look for the right positions for cur_min and cur_max\n for start in range(len(nums)):\n if nums[start] > cur_min:\n break\n for end in range(len(nums) - 1, -1, -1):\n if nums[end] < cur_max:\n break\n return 0 if end <= start else end - start + 1","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/shortest-unsorted-continuous-subarray/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too. \r\n\r\nYou need to find the shortest such subarray and output its length.\r\n\r\nExample 1:\r\n\r\nInput: [2, 6, 4, 8, 10, 9, 15]\r\nOutput: 5\r\nExplanation: You need to sort [6, 4, 8, 10, 9] in ascending order to make the whole array sorted in ascending order.\r\n\r\n\r\n\r\nNote:\r\n\r\nThen length of the input array is in range [1, 10,000].\r\nThe input array may contain duplicates, so ascending order here means . \r\n\r\n"},{"index":312,"title":"Burst Balloons","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N^3)$ still not sure about this. Posted a comment under [the official solution](https://leetcode.com/articles/burst-balloons/)","space":"$O(N^2)$","code":"from functools import lru_cache\n\nclass Solution:\n def maxCoins(self, nums: List[int]) -> int:\n\n # reframe the problem\n nums = [1] + nums + [1]\n\n # cache this\n @lru_cache(None)\n def dp(left, right):\n # no more balloons can be added\n if left + 1 == right: return 0\n\n # add each balloon on the interval and return the maximum score\n return max(nums[left] * nums[i] * nums[right] + dp(left, i) + dp(i, right) for i in range(left+1, right))\n\n # find the maximum number of coins obtained from adding all balloons from (0, len(nums) - 1)\n return dp(0, len(nums)-1)","language":""}],"anki":"","Link":"https://leetcode.com/problems/burst-balloons/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get nums[left] * nums[i] * nums[right] coins. Here left and right are adjacent indices of i. After the burst, the left and right then becomes adjacent.\r\n\r\nFind the maximum coins you can collect by bursting the balloons wisely.\r\n\r\nNote:\r\n\r\n\r\n\tYou may imagine nums[-1] = nums[n] = 1. They are not real therefore you can not burst them.\r\n\t0 ≤ n ≤ 500, 0 ≤ nums[i] ≤ 100\r\n\r\n\r\nExample:\r\n\r\n\r\nInput: [3,1,5,8]\r\nOutput: 167 \r\nExplanation: nums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> []\r\n  coins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 167\r\n"},{"index":85,"title":"Maximal Rectangle","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(MN)$ where $M*N$ is the size of the matrix","space":"$O(N)$","code":"class Solution:\n def maximalRectangle(self, matrix: List[List[str]]) -> int:\n if len(matrix) == 0: return 0\n for j in range(len(matrix[0])):\n for i in range(len(matrix)):\n if matrix[i][j] == '1':\n matrix[i][j] = matrix[i - 1][j] + 1 if i > 0 else 1\n else:\n matrix[i][j] = 0\n \n max_size = 0\n for i in range(len(matrix)):\n row_max = self.maxRow(matrix[i])\n max_size = max(max_size, row_max)\n \n return max_size\n \n def maxRow(self, row: List[int]) -> int:\n row.append(0)\n stack = [-1]\n max_row = 0\n for i in range(len(row)):\n while row[i] < row[stack[-1]]:\n h = row[stack.pop()]\n w = i - stack[-1] - 1\n max_row = max(max_row, h * w)\n stack.append(i)\n row.pop()\n return max_row","language":"python"},{"time":"$O(MN)$","space":"$O(M)$","code":"class Solution:\n def maximalRectangle(self, matrix: List[List[str]]) -> int:\n if not matrix: return 0\n m = len(matrix)\n n = len(matrix[0])\n h = [0] * n\n l = [0] * n\n r = [n] * n\n max_area = 0\n for i in range(m):\n cur_left, cur_right = 0, n\n for j in range(n - 1, -1, -1):\n if matrix[i][j] == '1':\n r[j] = min(r[j], cur_right)\n else:\n r[j] = n\n cur_right = j\n for j in range(n):\n if matrix[i][j] == '1':\n h[j] = h[j] + 1\n l[j] = max(l[j], cur_left)\n else:\n h[j] = 0\n l[j] = 0\n cur_left = j + 1\n max_area = max(max_area, h[j] * (r[j] - l[j]))\n \n return max_area","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/maximal-rectangle/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"I tried using a DFS search to look for rectangles but failed."},"desc":"Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.\r\n\r\nExample:\r\n\r\n\r\nInput:\r\n[\r\n [\"1\",\"0\",\"1\",\"0\",\"0\"],\r\n [\"1\",\"0\",\"1\",\"1\",\"1\"],\r\n [\"1\",\"1\",\"1\",\"1\",\"1\"],\r\n [\"1\",\"0\",\"0\",\"1\",\"0\"]\r\n]\r\nOutput: 6\r\n\r\n"},{"index":101,"title":"Symmetric Tree","body":{"mySolution":[{"time":"$O(2^N)$ where $N$ is the depth of the tree","space":"$O(2^N)$ due to the recursive stack","code":"# Definition for a binary tree node.\n# class TreeNode:\n# def __init__(self, x):\n# self.val = x\n# self.left = None\n# self.right = None\n\nclass Solution:\n def isSymmetric(self, root: TreeNode) -> bool:\n if not root: return True\n return self.sym(root.left, root.right)\n \n def sym(self, left, right):\n if left is None or right is None:\n return left == right\n return left.val == right.val and self.sym(left.left, right.right) and self.sym(left.right, right.left)","language":"python"}],"optimizedSolution":[{"time":"$O(2^N)$","space":"$O(2^N)$","code":"class Solution:\n def isSymmetric(self, root: TreeNode) -> bool:\n if not root: return True\n stack = [root.left, root.right]\n while len(stack) > 0:\n t1 = stack.pop()\n t2 = stack.pop()\n if not t1 and not t2:\n continue\n if not t1 or not t2 or t1.val != t2.val:\n return False\n stack.extend([t1.left, t2.right, t2.left, t1.right])\n return True","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/symmetric-tree/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).\r\n\r\nFor example, this binary tree [1,2,2,3,4,4,3] is symmetric:\r\n\r\n\r\n 1\r\n / \\\r\n 2 2\r\n / \\ / \\\r\n3 4 4 3\r\n\r\n\r\n \r\n\r\nBut the following [1,2,2,null,3,null,3] is not:\r\n\r\n\r\n 1\r\n / \\\r\n 2 2\r\n \\ \\\r\n 3 3\r\n\r\n\r\n \r\n\r\nNote:\r\nBonus points if you could solve it both recursively and iteratively.\r\n"},{"index":84,"title":"Largest Rectangle in Histogram","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def largestRectangleArea(self, heights: List[int]) -> int:\n heights.append(0)\n stack = [-1]\n ans = 0\n for i in range(len(heights)):\n while heights[i] < heights[stack[-1]]:\n h = heights[stack.pop()]\n w = i - stack[-1] - 1\n ans = max(ans, h * w)\n stack.append(i)\n heights.pop()\n return ans\n ","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/largest-rectangle-in-histogram/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"I was thinking about using a sliding window to solve the problem but with no results."},"desc":"Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.\r\n\r\n \r\n\r\n\r\nAbove is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].\r\n\r\n \r\n\r\n\r\nThe largest rectangle is shown in the shaded area, which has area = 10 unit.\r\n\r\n \r\n\r\nExample:\r\n\r\n\r\nInput: [2,1,5,6,2,3]\r\nOutput: 10\r\n\r\n"},{"index":66,"title":"Plus One","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a non-empty array of digits representing a non-negative integer, plus one to the integer.\r\n\r\nThe digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a single digit.\r\n\r\nYou may assume the integer does not contain any leading zero, except the number 0 itself.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [1,2,3]\r\nOutput: [1,2,4]\r\nExplanation: The array represents the integer 123.\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [4,3,2,1]\r\nOutput: [4,3,2,2]\r\nExplanation: The array represents the integer 4321.\r\n"},{"index":4,"title":"Median of Two Sorted Arrays","body":{"mySolution":[{"time":"$O(log(min(m, n))$","space":"$O(1)$","code":"class Solution:\n def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:\n # Assume m <= n\n if len(nums1) > len(nums2):\n nums1, nums2 = nums2, nums1\n m, n = len(nums1), len(nums2) \n m_min, m_max = 0, m\n mid = (m + n) // 2\n m1, n1 = 0, 0\n while m_min <= m_max:\n m1 = (m_min + m_max) // 2\n n1 = mid - m1\n if n1 != 0 and m != m1 and nums2[n1 - 1] > nums1[m1]:\n m_min = m1 + 1\n elif m1 != 0 and n != n1 and nums1[m1 - 1] > nums2[n1]:\n m_max = m1 - 1\n else:\n break\n\n leftMax = 0\n rightMin = 0\n if m1 == m or n1 == n:\n rightMin = nums2[n1] if m1 == m else nums1[m1]\n else:\n rightMin = min(nums1[m1], nums2[n1])\n\n if (m + n) % 2 == 1: return rightMin\n\n if m1 == 0 or n1 == 0:\n leftMax = nums2[n1 - 1] if m1 == 0 else nums1[m1 - 1]\n else:\n leftMax = max(nums1[m1 - 1], nums2[n1 - 1])\n \n return (leftMax + rightMin) / 2","language":"python"},{"time":"$O(log(min(m, n))$","space":"$O(1)$","code":"class Solution {\npublic:\n double findMedianSortedArrays(vector& nums1, vector& nums2) {\n // Make sure that m >= n\n if (nums1.size() < nums2.size()) {\n swap(nums1, nums2);\n }\n int m = nums1.size();\n int n = nums2.size();\n if (m == 0) {\n return n % 2 == 0 ? (nums2[n / 2 - 1] + nums2[n / 2]) / 2.0 : nums2[n / 2];\n }\n if (n == 0) {\n return m % 2 == 0 ? (nums1[m / 2 - 1] + nums1[m / 2]) / 2.0 : nums1[m / 2];\n }\n int half = (m + n) / 2;\n int start = half - n;\n int end = half;\n int i, j;\n while (start <= end) {\n i = (start + end) / 2;\n j = half - i;\n if (j > 0 && i < m && nums2[j - 1] > nums1[i]) {\n start = i + 1;\n continue;\n }\n if (i > 0 && j < n && nums1[i - 1] > nums2[j]) {\n end = i - 1;\n continue;\n }\n break;\n }\n int leftMax, rightMin;\n if (i == m || j == n) {\n rightMin = (i == m) ? nums2[j] : nums1[i];\n }\n else{\n rightMin = min(nums1[i], nums2[j]); \n }\n if ((m + n) % 2 == 1) {\n return rightMin;\n }\n if (i == 0 || j == 0) {\n leftMax = (i == 0) ? nums2[j - 1] : nums1[i - 1];\n }\n else {\n leftMax = max(nums1[i - 1], nums2[j - 1]);\n }\n return (leftMax + rightMin) / 2.0;\n }\n};","language":"cpp"}],"optimizedSolution":[{"time":"$O(log(min(m, n))$","space":"$O(1)$","code":"...\n# Line 13\n if m1 < m and nums2[n1 - 1] > nums1[m1]:\n m_min = m1 + 1\n elif m1 > 0 and nums1[m1 - 1] > nums2[n1]:\n m_max = m1 - 1\n else:\n break\n...","language":"python"}],"anki":"Binary search in the longer array. Watch for corner cases and the start and end of search range.","Link":"https://leetcode.com/problems/median-of-two-sorted-arrays/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":"* [1,2], [3,4]\n* [], [1]\n* [1], [2,3,4,5,6]"},"desc":"There are two sorted arrays nums1 and nums2 of size m and n respectively.\r\n\r\nFind the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).\r\n\r\nYou may assume nums1 and nums2 cannot be both empty.\r\n\r\nExample 1:\r\n\r\n\r\nnums1 = [1, 3]\r\nnums2 = [2]\r\n\r\nThe median is 2.0\r\n\r\n\r\nExample 2:\r\n\r\n\r\nnums1 = [1, 2]\r\nnums2 = [3, 4]\r\n\r\nThe median is (2 + 3)/2 = 2.5\r\n\r\n"},{"index":155,"title":"Min Stack","body":{"mySolution":[{"time":"$O(1)$","space":"$O(N)$","code":"class MinStack:\n def __init__(self):\n \"\"\n initialize your data structure here.\n \"\"\"\n self.list = []\n self.minList = []\n \n\n def push(self, x: int) -> None:\n self.list.append(x)\n if len(self.minList) == 0 or x < self.minList[-1]:\n self.minList.append(x)\n else:\n self.minList.append(self.minList[-1])\n \n def pop(self) -> None:\n self.list.pop()\n self.minList.pop()\n\n def top(self) -> int:\n return None if len(self.list) == 0 else self.list[-1]\n\n def getMin(self) -> int:\n return None if len(self.minList) == 0 else self.minList[-1]","language":"python"}],"optimizedSolution":[{"time":"$O(1)$","space":"$O(N)$","code":"class MinStack:\n def __init__(self):\n \"\"\"\n initialize your data structure here.\n \"\"\"\n self.list = []\n self.min = float('inf')\n \n\n def push(self, x: int) -> None:\n if x <= self.min:\n self.list.append(self.min)\n self.min = x\n self.list.append(x)\n \n def pop(self) -> None:\n if self.list.pop() == self.min:\n self.min = self.list.pop()\n\n def top(self) -> int:\n return self.list[-1]\n\n def getMin(self) -> int:\n return self.min","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/min-stack/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.\r\n\r\n\r\n\tpush(x) -- Push element x onto stack.\r\n\tpop() -- Removes the element on top of the stack.\r\n\ttop() -- Get the top element.\r\n\tgetMin() -- Retrieve the minimum element in the stack.\r\n\r\n\r\n \r\n\r\nExample:\r\n\r\n\r\nMinStack minStack = new MinStack();\r\nminStack.push(-2);\r\nminStack.push(0);\r\nminStack.push(-3);\r\nminStack.getMin(); --> Returns -3.\r\nminStack.pop();\r\nminStack.top(); --> Returns 0.\r\nminStack.getMin(); --> Returns -2.\r\n\r\n\r\n \r\n"},{"index":124,"title":"Binary Tree Maximum Path Sum","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$ where $N$ is the number of nodes in the tree","space":"$O(H)$ where $H$ is the height of the tree","code":"class Solution:\n def maxPathSum(self, root: TreeNode) -> int:\n max_sum = float('-inf')\n def max_gain(root):\n nonlocal max_sum\n if not root: return 0\n max_left = max(max_gain(root.left), 0)\n max_right = max(max_gain(root.right), 0)\n max_sum = max(max_sum, root.val + max_left + max_right)\n return root.val + max(max_left, max_right)\n max_gain(root)\n return max_sum","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/binary-tree-maximum-path-sum/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given a non-empty binary tree, find the maximum path sum.\r\n\r\nFor this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path must contain at least one node and does not need to go through the root.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [1,2,3]\r\n\r\n 1\r\n / \\\r\n 2 3\r\n\r\nOutput: 6\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [-10,9,20,null,null,15,7]\r\n\r\n  -10\r\n   / \\\r\n  9  20\r\n    /  \\\r\n   15   7\r\n\r\nOutput: 42\r\n\r\n"},{"index":142,"title":"Linked List Cycle II","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution(object):\n def detectCycle(self, head):\n \"\"\"\n :type head: ListNode\n :rtype: ListNode\n \"\"\"\n slow = fast = head\n while fast and slow:\n if not fast.next: return None\n fast = fast.next.next\n slow = slow.next\n if fast == slow:\n return self.findEntrance(head, fast)\n return None\n \n def findEntrance(self, head, intersect):\n while head != intersect:\n head = head.next\n intersect = intersect.next\n return head","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/linked-list-cycle-ii/","Solved":"- [ ] solved\n- [ ] by-discussion\n- [x] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"Completely no idea except for modifying the list"},"desc":"Given a linked list, return the node where the cycle begins. If there is no cycle, return null.\n\nTo represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects to. If pos is -1, then there is no cycle in the linked list.\n\nNote: Do not modify the linked list.\n\n \n\nExample 1:\n\n\nInput: head = [3,2,0,-4], pos = 1\nOutput: tail connects to node index 1\nExplanation: There is a cycle in the linked list, where tail connects to the second node.\n\n\n\n\nExample 2:\n\n\nInput: head = [1,2], pos = 0\nOutput: tail connects to node index 0\nExplanation: There is a cycle in the linked list, where tail connects to the first node.\n\n\n\n\nExample 3:\n\n\nInput: head = [1], pos = -1\nOutput: no cycle\nExplanation: There is no cycle in the linked list.\n\n\n\n\n \n\nFollow-up:\nCan you solve it without using extra space?\n"},{"index":57,"title":"Insert Interval","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).\r\n\r\nYou may assume that the intervals were initially sorted according to their start times.\r\n\r\nExample 1:\r\n\r\n\r\nInput: intervals = [[1,3],[6,9]], newInterval = [2,5]\r\nOutput: [[1,5],[6,9]]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]\r\nOutput: [[1,2],[3,10],[12,16]]\r\nExplanation: Because the new interval [4,8] overlaps with [3,5],[6,7],[8,10].\r\n\r\nNOTE: input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.\r\n"},{"index":43,"title":"Multiply Strings","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.\r\n\r\nExample 1:\r\n\r\n\r\nInput: num1 = \"2\", num2 = \"3\"\r\nOutput: \"6\"\r\n\r\nExample 2:\r\n\r\n\r\nInput: num1 = \"123\", num2 = \"456\"\r\nOutput: \"56088\"\r\n\r\n\r\nNote:\r\n\r\n\r\n\tThe length of both num1 and num2 is < 110.\r\n\tBoth num1 and num2 contain only digits 0-9.\r\n\tBoth num1 and num2 do not contain any leading zero, except the number 0 itself.\r\n\tYou must not use any built-in BigInteger library or convert the inputs to integer directly.\r\n\r\n"},{"index":15,"title":"3Sum","body":{"mySolution":[{"time":"$O(N^2log(N))$","space":"$O(1)$","code":"class Solution:\n def threeSum(self, nums: List[int]) -> List[List[int]]:\n if not nums:\n return []\n nums.sort()\n res = []\n # Use two pointers and binary search for the third one\n for l in range(0, len(nums) - 2):\n if l > 0 and nums[l] == nums[l - 1]:\n continue\n for r in range(len(nums) - 1, l + 1, -1):\n if r < len(nums) - 1 and nums[r] == nums[r + 1]:\n continue\n \n target = -nums[r] - nums[l]\n \n # If target is greater than the right element, since the target will increase when r decreases\n # we do not need to search further\n if target > nums[r]:\n break\n \n if target < nums[l]:\n continue\n \n start, end = l + 1, r - 1\n while start <= end:\n m = (start + end) // 2\n if nums[m] == target:\n res.append([nums[l], nums[m], nums[r]])\n break\n elif nums[m] < target:\n start = m + 1\n else:\n end = m - 1\n \n return res","language":"python"}],"optimizedSolution":[{"time":"$O(N^2)$","space":"$O(1)$","code":"class Solution:\n def threeSum(self, nums: List[int]) -> List[List[int]]:\n if not nums:\n return []\n nums.sort()\n res = []\n for i in range(len(nums) - 2):\n if i > 0 and nums[i] == nums[i - 1]:\n continue\n l = i + 1\n r = len(nums) - 1\n while l < r:\n s = nums[i] + nums[l] + nums[r]\n if s < 0:\n l += 1\n elif s > 0:\n r -= 1\n else:\n res.append([nums[i], nums[l], nums[r]])\n l += 1\n r -= 1\n while l < r and nums[l] == nums[l - 1]:\n l += 1\n while l < r and nums[r] == nums[r + 1]:\n r -= 1\n \n return res","language":"python"}],"anki":"Sort first. Use two pointers to approach to the middle. Use a while loop to avoid repetitive solution.","Link":"https://leetcode.com/problems/3sum/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.\r\n\r\nNote:\r\n\r\nThe solution set must not contain duplicate triplets.\r\n\r\nExample:\r\n\r\n\r\nGiven array nums = [-1, 0, 1, 2, -1, -4],\r\n\r\nA solution set is:\r\n[\r\n [-1, 0, 1],\r\n [-1, -1, 2]\r\n]\r\n\r\n"},{"index":297,"title":"Serialize and Deserialize Binary Tree","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"from collections import deque\n\n# Same codec with leetcode implementation\nclass Codec:\n\n def serialize(self, root):\n \"\"\"Encodes a tree to a single string.\n \n :type root: TreeNode\n :rtype: str\n \"\"\"\n res = []\n q = deque([root])\n while q:\n n = q.popleft()\n res.append(n.val if n else None) \n if n:\n q.append(n.left)\n q.append(n.right)\n \n i = len(res) - 1\n while i > -1 and res[i] == 'n': i -= 1\n return str(res[:i + 1])\n \n \n\n def deserialize(self, data):\n \"\"\"Decodes your encoded data to tree.\n \n :type data: str\n :rtype: TreeNode\n \"\"\"\n if not data: return None\n \n l = data[1:-1].split(',')\n \n def toNode(c):\n c = c.strip()\n if c == 'None':\n return None\n elif c[0] == '-':\n return TreeNode(int(c[1:]) * -1)\n return TreeNode(int(c))\n \n root = toNode(l[0])\n q = deque([root])\n i = 1\n isRight = False\n n = None\n \n while i < len(l):\n if not isRight:\n n = q.popleft()\n while n is None:\n n = q.popleft()\n n.left = toNode(l[i])\n i += 1\n isRight = True\n else:\n n.right = toNode(l[i])\n i += 1\n isRight = False\n q.append(n.left)\n q.append(n.right)\n \n return root\n ","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post the optimized solution after looking at the solution. ","language":""}],"anki":"","Link":"https://leetcode.com/problems/serialize-and-deserialize-binary-tree/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment.\r\n\r\nDesign an algorithm to serialize and deserialize a binary tree. There is no restriction on how your serialization/deserialization algorithm should work. You just need to ensure that a binary tree can be serialized to a string and this string can be deserialized to the original tree structure.\r\n\r\nExample: \r\n\r\n\r\nYou may serialize the following tree:\r\n\r\n 1\r\n / \\\r\n 2 3\r\n / \\\r\n 4 5\r\n\r\nas \"[1,2,3,null,null,4,5]\"\r\n\r\n\r\nClarification: The above format is the same as how LeetCode serializes a binary tree. You do not necessarily need to follow this format, so please be creative and come up with different approaches yourself.\r\n\r\nNote: Do not use class member/global/static variables to store states. Your serialize and deserialize algorithms should be stateless.\r\n"},{"index":438,"title":"Find All Anagrams in a String","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def findAnagrams(self, s: str, p: str) -> List[int]:\n res = []\n # count stores the count of numbers in p\n count = {}\n # matched stores the number of letters in our sliding window that has the same count as p\n matched = 0\n\n if len(s) < len(p):\n return res\n \n for c in p:\n count[c] = count.get(c, 0) + 1\n \n for i in range(len(p)):\n c = s[i]\n if c in count:\n count[c] -= 1\n matched += count[c] == 0\n matched -= count[c] < 0\n \n start = 0\n end = start + len(p) - 1\n \n while end < len(s):\n if matched == len(count.keys()):\n res.append(start)\n \n if s[start] in count:\n count[s[start]] += 1\n matched -= count[s[start]] == 1\n matched += count[s[start]] == 0\n \n start += 1\n end += 1\n\n if end < len(s) and s[end] in count:\n count[s[end]] -= 1\n matched -= count[s[end]] == -1\n matched += count[s[end]] == 0\n \n return res","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n # much cleaner code\n def findAnagrams(self, s: str, p: str) -> List[int]:\n res = []\n count = {}\n matched = 0\n\n if len(s) < len(p):\n return res\n \n for c in p:\n count[c] = count.get(c, 0) + 1\n \n def changeCount(c, num):\n if c not in count:\n return\n nonlocal matched\n matched -= count[c] == 0\n count[c] += num\n matched += count[c] == 0\n \n for i in range(len(p)):\n changeCount(s[i], -1)\n\n if matched == len(count.keys()):\n res.append(0)\n \n start = 1\n while start + len(p) - 1 < len(s):\n changeCount(s[start - 1], 1)\n changeCount(s[start + len(p) - 1], -1)\n if matched == len(count.keys()):\n res.append(start)\n start += 1\n \n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/find-all-anagrams-in-a-string/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.\r\n\r\nStrings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100.\r\n\r\nThe order of output does not matter.\r\n\r\nExample 1:\r\n\r\nInput:\r\ns: \"cbaebabacd\" p: \"abc\"\r\n\r\nOutput:\r\n[0, 6]\r\n\r\nExplanation:\r\nThe substring with start index = 0 is \"cba\", which is an anagram of \"abc\".\r\nThe substring with start index = 6 is \"bac\", which is an anagram of \"abc\".\r\n\r\n\r\n\r\nExample 2:\r\n\r\nInput:\r\ns: \"abab\" p: \"ab\"\r\n\r\nOutput:\r\n[0, 1, 2]\r\n\r\nExplanation:\r\nThe substring with start index = 0 is \"ab\", which is an anagram of \"ab\".\r\nThe substring with start index = 1 is \"ba\", which is an anagram of \"ab\".\r\nThe substring with start index = 2 is \"ab\", which is an anagram of \"ab\".\r\n\r\n"},{"index":42,"title":"Trapping Rain Water","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$ worst case for a decreasing list","code":"class Solution:\n def trap(self, height: List[int]) -> int:\n if not height:\n return 0\n s = 0\n stack = []\n for i in range(len(height)):\n while stack and height[stack[-1]] < height[i]:\n top = stack.pop()\n if not stack:\n break\n s += (i - stack[-1] - 1) * (min(height[i], height[stack[-1]]) - height[top])\n stack.append(i)\n return s","language":"python"},{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n # Dynamic programming\n def trap(self, height: List[int]) -> int:\n if not height:\n return 0\n s = 0\n maxleft = [0] * len(height)\n maxright = [0] * len(height)\n maxleft[0] = height[0]\n for i in range(1, len(height)):\n maxleft[i] = max(maxleft[i - 1], height[i])\n maxright[-1] = height[-1]\n for i in range(len(height) - 2, -1, -1):\n maxright[i] = max(maxright[i + 1], height[i])\n for i in range(len(height)):\n s += min(maxleft[i], maxright[i]) - height[i]\n return s","language":"python"},{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def trap(self, height: List[int]) -> int:\n s = 0\n left = 0\n right = len(height) - 1\n left_max = right_max = 0\n while left < right:\n # If height[left] < height[right],\n # that means height[left] < min(left_max, right_max)\n # so the increasing size would only be depending on the left max\n # Same for the right side. \n if height[left] < height[right]:\n left_max = max(height[left], left_max)\n s += left_max - height[left]\n left += 1\n else:\n right_max = max(height[right], right_max)\n s += right_max - height[right]\n right -= 1\n return s","language":"python"}],"anki":"Three methods can be used to solve this problem. And all three can be done within linear time.\n1. Using stack. We are tring to catch the 'V' pattern in the histogram. And a stack is used to store the left side of 'V'. We ignore the case when decreasing or increasing when stack is empty. For the other cases, the water that a column can retain is calculated by the vertical bar formed with the left bounds that are smaller than it.\n2. Dynamic programming. Suppose you're standing on one of the bar. Look left, the highest bar is `maxleft[i]`. The `maxright[i]` is defined the same. The water that can finally be \"stored\" on top of the bar is decided by the minimum of the left/right boundary. So we store the `maxleft` and `maxright` at each bar. And accumulate the value by using `min(left, right) - height[i]`.\n3. Method 2 can be optimized by only using constant space and two pointers. Use `maxleft` and `maxright` to store the maximum up to now. When `height[left] < height[right]`, `height[left]` is able to keep water if `maxleft > height[left]`. So we accululate the `maxleft - height[left]` each time. Same for the right side.","Link":"https://leetcode.com/problems/trapping-rain-water/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.\r\n\r\n\r\nThe above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image!\r\n\r\nExample:\r\n\r\n\r\nInput: [0,1,0,2,1,0,1,3,2,1,2,1]\r\nOutput: 6\r\n"},{"index":1038,"title":"Binary Search Tree to Greater Sum Tree","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given the root of a binary search tree with distinct values, modify it so that every node has a new value equal to the sum of the values of the original tree that are greater than or equal to node.val.\r\n\r\nAs a reminder, a binary search tree is a tree that satisfies these constraints:\r\n\r\n\r\n\tThe left subtree of a node contains only nodes with keys less than the node's key.\r\n\tThe right subtree of a node contains only nodes with keys greater than the node's key.\r\n\tBoth the left and right subtrees must also be binary search trees.\r\n\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\n\r\n\r\nInput: [4,1,6,0,2,5,7,null,null,null,3,null,null,null,8]\r\nOutput: [30,36,21,36,35,26,15,null,null,null,33,null,null,null,8]\r\n\r\n\r\n\r\n \r\n\r\n\r\nNote:\r\n\r\n\r\n\tThe number of nodes in the tree is between 1 and 100.\r\n\tEach node will have value between 0 and 100.\r\n\tThe given tree is a binary search tree.\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n"},{"index":301,"title":"Remove Invalid Parentheses","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(2^N)$ in worst case for example '(((((('","space":"$O(N)$ maximum recursion depth is $N$ as well as the size of the expr list","code":"class Solution:\n def removeInvalidParentheses(self, s):\n left = 0\n right = 0\n\n # Determine the number of left and right bracket to remove\n # used for pruning the recursion tree later\n \n for i in s:\n if i == '(':\n left += 1\n elif i == ')':\n if left > 0:\n left -= 1\n else:\n right += 1\n \n res = set()\n expr = []\n \n def rec(ind, left_rem, right_rem, left_count, right_count):\n if ind == len(s):\n # The expression is valid if the unvalid brackets are removed\n if left_rem == 0 and right_rem == 0:\n valid_str = ''.join(expr)\n res.add(valid_str)\n return\n \n char = s[ind]\n ind += 1\n \n # Case 1. we remove the current bracket\n if (char == '(' and left_rem > 0) or (char == ')' and right_rem > 0):\n rec(ind, left_rem - (char == '('), right_rem - (char == ')'), left_count, right_count)\n\n expr.append(char)\n \n # Case 2. we keep the current bracket or any other character\n if char == '(':\n rec(ind, left_rem, right_rem, left_count + 1, right_count)\n elif char == ')' and left_count > right_count:\n rec(ind, left_rem, right_rem, left_count, right_count + 1)\n elif char != ')' and char != '(':\n rec(ind, left_rem, right_rem, left_count, right_count)\n \n # Pop the current char for backtracking\n expr.pop(-1)\n \n rec(0, left, right, 0, 0)\n return list(res)","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/remove-invalid-parentheses/","Solved":"- [ ] solved\n- [ ] by-discussion\n- [x] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.\r\n\r\nNote: The input string may contain letters other than the parentheses ( and ).\r\n\r\nExample 1:\r\n\r\n\r\nInput: \"()())()\"\r\nOutput: [\"()()()\", \"(())()\"]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: \"(a)())()\"\r\nOutput: [\"(a)()()\", \"(a())()\"]\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput: \")(\"\r\nOutput: [\"\"]\r\n"},{"index":167,"title":"Two Sum II - Input array is sorted","body":{"mySolution":[{"time":"$O(Nlog(N)$ or $O(N-1) + O(N-2) + ... + O(1) = O((N-1)!)$","space":"$O(1)$","code":"class Solution:\n # Binary search\n def twoSum(self, numbers: List[int], target: int) -> List[int]:\n for i in range(len(numbers) - 1):\n if i > 0 and numbers[i] == numbers[i - 1]:\n continue\n start = i + 1\n end = len(numbers) - 1\n if numbers[end] < target - numbers[i]:\n continue\n while start <= end:\n mid = (start + end) // 2\n if numbers[mid] == target - numbers[i]:\n return [i + 1, mid + 1]\n elif numbers[mid] < target - numbers[i]:\n start = mid + 1\n else:\n end = mid - 1","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n # Two pointers\n # Since we only need to find one solution and this solution is guranteed to exist, we can use two pointers\n # This solution cannot work if we're going to find all solutions\n def twoSum(self, numbers: List[int], target: int) -> List[int]:\n l, r = 0, len(numbers) - 1\n while l < r:\n s = numbers[l] + numbers[r]\n if s == target:\n return [l + 1, r + 1]\n elif s < target:\n l += 1\n while numbers[l] == numbers[l - 1]:\n l += 1\n else:\n r -= 1\n while numbers[r] == numbers[r + 1]:\n r -= 1","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.\r\n\r\nThe function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2.\r\n\r\nNote:\r\n\r\n\r\n\tYour returned answers (both index1 and index2) are not zero-based.\r\n\tYou may assume that each input would have exactly one solution and you may not use the same element twice.\r\n\r\n\r\nExample:\r\n\r\n\r\nInput: numbers = [2,7,11,15], target = 9\r\nOutput: [1,2]\r\nExplanation: The sum of 2 and 7 is 9. Therefore index1 = 1, index2 = 2.\r\n"},{"index":148,"title":"Sort List","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(NlgN)$","space":"$O(1)$","code":"class Solution:\n def sortList(self, head: ListNode) -> ListNode:\n # Find the length of the list\n l = 0\n node = head\n while node:\n l += 1\n node = node.next\n step = 1\n dummy = ListNode(0)\n dummy.next = head\n while step < l:\n left = dummy.next\n tail = dummy\n while left:\n right = self.split(left, step)\n nextLeft = self.split(right, step)\n tail = self.merge(left, right, tail)\n left = nextLeft\n tail.next = left\n step *= 2\n return dummy.next\n \n def split(self, head, length):\n # Split a list of length from head, set tail.next to be None\n if not head: return None\n i = 1\n while head.next and i < length:\n head = head.next\n i += 1\n \n n = head.next\n head.next = None\n return n\n \n def merge(self, left, right, tail):\n # Merge left and right and append the merged list to tail\n # Return the merged tail\n while left and right:\n if left.val < right.val:\n tail.next = left\n left = left.next\n else:\n tail.next = right\n right = right.next\n tail = tail.next\n \n tail.next = left if left else right\n while tail.next: tail = tail.next\n return tail","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/sort-list/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Sort a linked list in O(n log n) time using constant space complexity.\r\n\r\nExample 1:\r\n\r\n\r\nInput: 4->2->1->3\r\nOutput: 1->2->3->4\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: -1->5->3->4->0\r\nOutput: -1->0->3->4->5\r\n"},{"index":33,"title":"Search in Rotated Sorted Array","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.\r\n\r\n(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).\r\n\r\nYou are given a target value to search. If found in the array return its index, otherwise return -1.\r\n\r\nYou may assume no duplicate exists in the array.\r\n\r\nYour algorithm's runtime complexity must be in the order of O(log n).\r\n\r\nExample 1:\r\n\r\n\r\nInput: nums = [4,5,6,7,0,1,2], target = 0\r\nOutput: 4\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: nums = [4,5,6,7,0,1,2], target = 3\r\nOutput: -1\r\n"},{"index":221,"title":"Maximal Square","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(MN)$ where $M*N$ is the size of the matrix","space":"$O(MN)$","code":"class Solution:\n def maximalSquare(self, matrix: List[List[str]]) -> int:\n if not matrix: return 0\n n = len(matrix)\n m = len(matrix[0])\n dp = [([0] * m) for _ in range(n)]\n max_len = 0\n for i in range(n):\n for j in range(m):\n if matrix[i][j] == '0': continue\n a = dp[i][j - 1] if j > 0 else 0\n b = dp[i - 1][j] if i > 0 else 0\n c = dp[i - 1][j - 1] if i > 0 and j > 0 else 0\n dp[i][j] = min(a, b, c) + 1\n max_len = max(max_len, dp[i][j])\n return max_len * max_len","language":"python"},{"time":"$O(MN)$","space":"$O(min(M, N))$","code":"class Solution:\n def maximalSquare(self, matrix: List[List[str]]) -> int:\n if not matrix: return 0\n m = len(matrix[0])\n dp = [0] * m\n max_len = 0\n last = 0\n for i in range(len(matrix)):\n for j in range(m):\n if matrix[i][j] == '0':\n dp[j] = 0\n else:\n dp[j], last = min(dp[j - 1] if j > 0 else 0, dp[j], last) + 1, dp[j]\n max_len = max(max_len, dp[j])\n return max_len * max_len\n","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/maximal-square/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.\r\n\r\nExample:\r\n\r\n\r\nInput: \r\n\r\n1 0 1 0 0\r\n1 0 1 1 1\r\n1 1 1 1 1\r\n1 0 0 1 0\r\n\r\nOutput: 4\r\n"},{"index":165,"title":"Compare Version Numbers","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def compareVersion(self, version1: str, version2: str) -> int:\n arr1 = version1.split('.')\n arr2 = version2.split('.')\n flag = 1\n if len(arr2) > len(arr1):\n arr1, arr2 = arr2, arr1\n flag = -1\n \n for i in range(len(arr2)):\n v1 = int(arr1[i])\n v2 = int(arr2[i])\n if v1 > v2:\n return flag\n if v1 < v2:\n return -1 * flag\n \n for i in range(len(arr2), len(arr1)):\n if int(arr1[i]) > 0:\n return 1 * flag\n\n return 0","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def compareVersion(self, version1: str, version2: str) -> int:\n i = j = 0\n while i < len(version1) or j < len(version2):\n num1 = num2 = 0\n while i < len(version1) and version1[i] != '.':\n num1 = 10 * num1 + ord(version1[i]) - ord('0')\n i += 1\n while j < len(version2) and version2[j] != '.':\n num2 = 10 * num2 + ord(version2[j]) - ord('0')\n j += 1\n \n if num1 > num2:\n return 1\n if num1 < num2:\n return -1\n \n i += 1\n j += 1\n \n return 0","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/compare-version-numbers/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Compare two version numbers version1 and version2.\r\nIf version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0.\r\n\r\nYou may assume that the version strings are non-empty and contain only digits and the . character.\r\nThe . character does not represent a decimal point and is used to separate number sequences.\r\nFor instance, 2.5 is not \"two and a half\" or \"half way to version three\", it is the fifth second-level revision of the second first-level revision.\r\nYou may assume the default revision number for each level of a version number to be 0. For example, version number 3.4 has a revision number of 3 and 4 for its first and second level revision number. Its third and fourth level revision number are both 0.\r\n\r\n \r\n\r\nExample 1:\r\n\r\nInput: version1 = \"0.1\", version2 = \"1.1\"\r\nOutput: -1\r\n\r\nExample 2:\r\n\r\nInput: version1 = \"1.0.1\", version2 = \"1\"\r\nOutput: 1\r\n\r\nExample 3:\r\n\r\nInput: version1 = \"7.5.2.4\", version2 = \"7.5.3\"\r\nOutput: -1\r\n\r\nExample 4:\r\n\r\nInput: version1 = \"1.01\", version2 = \"1.001\"\r\nOutput: 0\r\nExplanation: Ignoring leading zeroes, both “01” and “001\" represent the same number “1”\r\n\r\nExample 5:\r\n\r\nInput: version1 = \"1.0\", version2 = \"1.0.0\"\r\nOutput: 0\r\nExplanation: The first version number does not have a third level revision number, which means its third level revision number is default to \"0\"\r\n\r\n \r\n\r\nNote:\r\n\r\nVersion strings are composed of numeric strings separated by dots . and this numeric strings may have leading zeroes. \r\nVersion strings do not start or end with dots, and they will not be two consecutive dots.\r\n"},{"index":399,"title":"Evaluate Division","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n \n # Solve the relationships stored in a dict\n def solveDict(self, db, known_var, value, from_var):\n # We add the variable `from_var` to prevent recursion, for example,\n # db['d'] = { f: 2.0 }\n # db['f'] = { d: 0.5 }\n for var, times in db[known_var].items():\n if from_var == var or known_var == var:\n continue\n if var not in db:\n db[var] = value / times\n elif type(db.get(var)) == dict:\n self.solveDict(db, var, value / times, known_var)\n db[known_var] = value\n \n # If we already have results for x, either\n # 1. If x is a float, we can solve for y\n # 2. If x is a dict, we add the relations for y into the dict\n def assignVar(self, db, x, y, v):\n if type(db[x]) == dict:\n db[x][y] = v\n db[y] = { x: 1/v }\n else:\n db[y] = db[x] / v\n \n def calcEquation(self, equations: List[List[str]], values: List[float], queries: List[List[str]]) -> List[float]:\n db = dict()\n # Set a reference variable\n db[equations[0][1]] = 1.0\n for i in range(len(equations)):\n x, y = equations[i]\n v = values[i]\n # If both variables have not been recorded,\n # we save the relative relations in a dict.\n # Also the dict has a reference to it self,\n # in order to distinguish variables that have never shown up\n if x not in db and y not in db:\n db[x] = { y: v, x: 1.0 }\n db[y] = { x: 1/v, y: 1.0 }\n # Both have been recorded\n elif x in db and y in db:\n if type(db[x]) == float and type(db[y]) == float:\n continue\n # If either value is a dict,\n # we can solve for the variables stored in the dict\n elif type(db[x]) == float:\n self.solveDict(db, y, db[x] / v, None)\n elif type(db[y]) == float:\n self.solveDict(db, x, db[y] * v, None)\n elif x in db:\n self.assignVar(db, x, y, v) \n elif y in db:\n self.assignVar(db, y, x, 1 / v)\n \n res = [0] * len(queries) \n for i in range(len(queries)):\n x, y = queries[i]\n \n # If we know both variables as floats\n if type(db.get(x)) == float and type(db.get(y)) == float:\n res[i] = db[x] / db[y]\n # If we only know the relative relationship(dict)\n # we look for the variable in the dict\n elif type(db.get(x)) == dict and y in db[x]:\n res[i] = db[x][y]\n elif type(db.get(y)) == dict and x in db[y]:\n res[i] = 1 / db[y][x]\n # Else we don't know the result\n else:\n res[i] = -1.0\n \n return res","language":"python"}],"optimizedSolution":[{"time":"$O(E + V)$ where $E$ is the number of edges and $V$ is the number of vertices","space":"$O(E)$","code":"class Solution(object):\n def calcEquation(self, equations, values, queries):\n\n graph = {}\n \n def build_graph(equations, values):\n def add_edge(f, t, value):\n if f in graph:\n graph[f].append((t, value))\n else:\n graph[f] = [(t, value)]\n \n for vertices, value in zip(equations, values):\n f, t = vertices\n add_edge(f, t, value)\n add_edge(t, f, 1/value)\n \n def find_path(query):\n b, e = query\n \n if b not in graph or e not in graph:\n return -1.0\n \n q = collections.deque([(b, 1.0)])\n visited = set()\n \n while q:\n front, cur_product = q.popleft()\n if front == e:\n return cur_product\n visited.add(front)\n for neighbor, value in graph[front]:\n if neighbor not in visited:\n q.append((neighbor, cur_product*value))\n \n return -1.0\n \n build_graph(equations, values)\n return [find_path(q) for q in queries]","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/evaluate-division/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer does not exist, return -1.0.\r\n\r\nExample:\r\nGiven a / b = 2.0, b / c = 3.0.\r\nqueries are: a / c = ?, b / a = ?, a / e = ?, a / a = ?, x / x = ? .\r\nreturn [6.0, 0.5, -1.0, 1.0, -1.0 ].\r\n\r\nThe input is: vector> equations, vector& values, vector> queries , where equations.size() == values.size(), and the values are positive. This represents the equations. Return vector.\r\n\r\nAccording to the example above:\r\n\r\n\r\nequations = [ [\"a\", \"b\"], [\"b\", \"c\"] ],\r\nvalues = [2.0, 3.0],\r\nqueries = [ [\"a\", \"c\"], [\"b\", \"a\"], [\"a\", \"e\"], [\"a\", \"a\"], [\"x\", \"x\"] ]. \r\n\r\n \r\n\r\nThe input is always valid. You may assume that evaluating the queries will result in no division by zero and there is no contradiction.\r\n"},{"index":239,"title":"Sliding Window Maximum","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$ $k$ for the deque, $n - k + 1$ for the output","code":"from collections import deque\nclass Solution:\n def maxSlidingWindow(self, nums: 'List[int]', k: 'int') -> 'List[int]':\n # base cases\n n = len(nums)\n if n * k == 0:\n return []\n if k == 1:\n return nums\n \n # For a sliding window\n # deq keeps (index of) the maximum number\n # and the \"potential maximum\" numbers after the maximum number \n deq = deque()\n # The deq is in decreasing order\n # so the maximum elment is always deq[0]\n for i in range(k):\n # Everytime before we append a new number\n # we remove the numbers that are smaller than nums[i]\n # since they will not be the maximum\n while deq and nums[i] > nums[deq[-1]]:\n deq.pop()\n deq.append(i)\n output = [nums[deq[0]]]\n \n for i in range(k, n):\n # If the maximum number is out of the window\n # we popleft it\n if deq and deq[0] == i - k:\n deq.popleft() \n while deq and nums[i] > nums[deq[-1]]:\n deq.pop() \n deq.append(i)\n output.append(nums[deq[0]])\n\n return output","language":"python"},{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def maxSlidingWindow(self, nums: 'List[int]', k: 'int') -> 'List[int]':\n # base cases\n n = len(nums)\n if n * k == 0:\n return []\n if k == 1:\n return nums\n # Split the whole list into blocks of size k\n # The last one can be smaller than k.\n \n # left[i]: the maximum number from the nearest block start to i\n # right[i]: the maximum number from the nearest block end to i\n left = [0] * n\n right = [0] * n\n maxleft = maxright = float('-inf')\n \n for i in range(n):\n maxleft = max(nums[i], maxleft)\n left[i] = maxleft\n if (i + 1) % k == 0:\n maxleft = float('-inf')\n \n for i in range(n - 1, -1, -1):\n if (i + 1) % k == 0:\n maxright = float('-inf')\n maxright = max(nums[i], maxright)\n right[i] = maxright\n \n output = [0] * (n - k + 1)\n for i in range(0, n - k + 1):\n output[i] = max(right[i], left[i + k - 1])\n \n return output\n ","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/sliding-window-maximum/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window.\r\n\r\nExample:\r\n\r\n\r\nInput: nums = [1,3,-1,-3,5,3,6,7], and k = 3\r\nOutput: [3,3,5,5,6,7] \r\nExplanation: \r\n\r\nWindow position Max\r\n--------------- -----\r\n[1 3 -1] -3 5 3 6 7 3\r\n 1 [3 -1 -3] 5 3 6 7 3\r\n 1 3 [-1 -3 5] 3 6 7 5\r\n 1 3 -1 [-3 5 3] 6 7 5\r\n 1 3 -1 -3 [5 3 6] 7 6\r\n 1 3 -1 -3 5 [3 6 7] 7\r\n\r\n\r\nNote: \r\nYou may assume k is always valid, 1 ≤ k ≤ input array's size for non-empty array.\r\n\r\nFollow up:\r\nCould you solve it in linear time?"},{"index":139,"title":"Word Break","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N^2)$","space":"$O(N)$","code":"class Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> bool:\n word_set = set(wordDict)\n min_len = float('inf')\n max_len = 0\n for w in word_set:\n min_len = min(len(w), min_len)\n max_len = max(len(w), max_len)\n \n l = len(s)\n memo = [None] * (l + 1)\n \n def helper(start):\n if start == l:\n return True\n if memo[start] is not None:\n return memo[start]\n for i in range(start, l):\n if i - start + 1 >= min_len and i - start + 1 <= max_len and s[start:i+1] in word_set:\n if helper(i + 1):\n memo[start] = True\n return True\n memo[start] = False\n return False\n \n return helper(0)","language":"python"},{"time":"$O(N^2)$","space":"$O(N)$","code":"class Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> bool:\n word_set = set(wordDict)\n dp = [False] * (len(s) + 1)\n dp[0] = True\n # dp[j] represents whether s[:j] can be represented by the dict\n # dp[0] is considered to be true\n for i in range(len(s)):\n for j in range(i + 1):\n if dp[j] and s[j:i+1] in word_set:\n dp[i + 1] = True\n break\n return dp[len(s)]","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-break/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"I have thought of the brute force solution but without the memoization step, which would solve the TLE issue for me."},"desc":"Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.\r\n\r\nNote:\r\n\r\n\r\n\tThe same word in the dictionary may be reused multiple times in the segmentation.\r\n\tYou may assume the dictionary does not contain duplicate words.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: s = \"leetcode\", wordDict = [\"leet\", \"code\"]\r\nOutput: true\r\nExplanation: Return true because \"leetcode\" can be segmented as \"leet code\".\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: s = \"applepenapple\", wordDict = [\"apple\", \"pen\"]\r\nOutput: true\r\nExplanation: Return true because \"applepenapple\" can be segmented as \"apple pen apple\".\r\n  Note that you are allowed to reuse a dictionary word.\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput: s = \"catsandog\", wordDict = [\"cats\", \"dog\", \"sand\", \"and\", \"cat\"]\r\nOutput: false\r\n\r\n"},{"index":206,"title":"Reverse Linked List","body":{"mySolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution(object):\n def reverseList(self, head):\n \"\"\"\n :type head: ListNode\n :rtype: ListNode\n \"\"\"\n if not head: return head\n n, nx = head, head.next\n n.next = None\n while nx:\n nxx = nx.next\n nx.next = n\n n, nx = nx, nxx\n return n","language":"python"},{"time":"$O(N)$","space":"$O(N)$","code":"class Solution(object):\n def reverseList(self, head):\n if not head or not head.next: return head\n p = self.reverseList(head.next)\n head.next.next = head\n head.next = None\n return p","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/reverse-linked-list/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Reverse a singly linked list.\r\n\r\nExample:\r\n\r\n\r\nInput: 1->2->3->4->5->NULL\r\nOutput: 5->4->3->2->1->NULL\r\n\r\n\r\nFollow up:\r\n\r\nA linked list can be reversed either iteratively or recursively. Could you implement both?\r\n"},{"index":269,"title":"Alien Dictionary","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(V+E)$ where $V$ is the vertices of the graph and $E$ is the edges","space":"$O(V+E)$","code":"from collections import defaultdict, deque\n\nclass Solution:\n def alienOrder(self, words: List[str]) -> str:\n indegree = {}\n after_dict = defaultdict(list)\n \n for c in ''.join(words):\n indegree[c] = 0\n\n for i in range(len(words) - 1):\n ind = 0\n while ind < len(words[i]) and ind < len(words[i + 1]) and words[i][ind] == words[i + 1][ind]:\n ind += 1\n # Identical or prefix\n if ind == len(words[i]) or ind == len(words[i + 1]):\n continue\n else:\n pre = words[i][ind]\n after = words[i + 1][ind]\n indegree[after] += 1\n after_dict[pre].append(after)\n\n q = deque([k for k in indegree.keys() if indegree[k] == 0])\n res = ''\n visited = 0\n while q:\n k = q.popleft()\n res += k\n visited += 1\n for after in after_dict[k]:\n indegree[after] -= 1\n if indegree[after] == 0:\n q.append(after)\n \n return '' if visited != len(indegree) else res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/alien-dictionary/","Related":"- [207. Course Schedule](quiver-note-url/B50011DE-B57A-4A0C-8FEB-6EF3630E50E3)","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Test Cases":"- [\"xz\",\"zx\",\"za\",\"axf\"]: Test unordered char 'f' and rearrange of order\n- [\"z\", \"x\", \"z\", \"a\"]: Invalid order\n- [\"xz\",\"zx\",\"zx\",\"za\",\"zaf\",\"ax\"]: Prefix"},"desc":"There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty words from the dictionary, where words are sorted lexicographically by the rules of this new language. Derive the order of letters in this language.\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\n[\r\n \"wrt\",\r\n \"wrf\",\r\n \"er\",\r\n \"ett\",\r\n \"rftt\"\r\n]\r\n\r\nOutput: \"wertf\"\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\n[\r\n \"z\",\r\n \"x\"\r\n]\r\n\r\nOutput: \"zx\"\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput:\r\n[\r\n \"z\",\r\n \"x\",\r\n \"z\"\r\n] \r\n\r\nOutput: \"\" \r\n\r\nExplanation: The order is invalid, so return \"\".\r\n\r\n\r\nNote:\r\n\r\n\r\n\tYou may assume all letters are in lowercase.\r\n\tYou may assume that if a is a prefix of b, then a must appear before b in the given dictionary.\r\n\tIf the order is invalid, return an empty string.\r\n\tThere may be multiple valid order of letters, return any one of them is fine.\r\n\r\n"},{"index":1,"title":"Two Sum","body":{"mySolution":[{"time":"$O(N^2)$","space":"$O(1)$","code":"class Solution {\npublic:\n vector twoSum(vector& nums, int target) {\n vector result(2, 0);\n for (int i = 0; i < nums.size() - 1; ++i) {\n for (int j = i + 1; j < nums.size(); ++j) {\n if (nums[i] + nums[j] == target) {\n result[0] = i;\n result[1] = j;\n }\n }\n }\n return result;\n }\n};","language":"cpp"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution {\n// Using of unordered_map\n// Directly return initializer list\npublic:\n vector twoSum(vector& nums, int target) {\n unordered_map hash;\n for (int i = 0; i < nums.size(); ++i) {\n if (hash.find(target - nums[i]) != hash.end()) {\n return {hash[target - nums[i]], i};\n }\n hash[nums[i]] = i;\n }\n return {};\n }\n};","language":"cpp"}],"anki":"Use hash to search for another number","Link":"https://leetcode.com/problems/two-sum/","Related":"","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Given an array of integers, return indices of the two numbers such that they add up to a specific target.\r\n\r\nYou may assume that each input would have exactly one solution, and you may not use the same element twice.\r\n\r\nExample:\r\n\r\n\r\nGiven nums = [2, 7, 11, 15], target = 9,\r\n\r\nBecause nums[0] + nums[1] = 2 + 7 = 9,\r\nreturn [0, 1].\r\n\r\n"},{"index":70,"title":"Climbing Stairs","body":{"mySolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def climbStairs(self, n: int) -> int:\n if n == 1: return 1\n\n dp = [0] * n\n dp[0] = 1\n dp[1] = 2\n\n for i in range(2, n):\n dp[i] = dp[i - 1] + dp[i - 2]\n\n return dp[n - 1]","language":"python"}],"optimizedSolution":[],"anki":"Dynamic programming","Link":"https://leetcode.com/problems/climbing-stairs/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"You are climbing a stair case. It takes n steps to reach to the top.\r\n\r\nEach time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?\r\n\r\nNote: Given n will be a positive integer.\r\n\r\nExample 1:\r\n\r\n\r\nInput: 2\r\nOutput: 2\r\nExplanation: There are two ways to climb to the top.\r\n1. 1 step + 1 step\r\n2. 2 steps\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: 3\r\nOutput: 3\r\nExplanation: There are three ways to climb to the top.\r\n1. 1 step + 1 step + 1 step\r\n2. 1 step + 2 steps\r\n3. 2 steps + 1 step\r\n\r\n"},{"index":309,"title":"Best Time to Buy and Sell Stock with Cooldown","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def maxProfit(self, prices: List[int]) -> int:\n if not prices:\n return 0\n\n s0 = [0] * len(prices)\n s1 = [0] * len(prices)\n s2 = [0] * len(prices)\n \n s0[0] = 0\n s1[0] = -prices[0]\n s2[0] = float('-inf')\n \n for i in range(1, len(prices)):\n s0[i] = max(s0[i - 1], s2[i - 1])\n s1[i] = max(s0[i - 1] - prices[i], s1[i - 1])\n s2[i] = s1[i - 1] + prices[i]\n \n return max(s2[len(prices) - 1], s0[len(prices) - 1])","language":"python"},{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n # Similar with other dp problems\n # the space usage can be optimized\n def maxProfit(self, prices: List[int]) -> int:\n if not prices:\n return 0\n \n s0 = 0\n s1 = -prices[0]\n s2 = float('-inf')\n \n for i in range(1, len(prices)):\n tmp = s1\n s1 = max(s0 - prices[i], tmp)\n s0 = max(s0, s2)\n s2 = tmp + prices[i]\n \n return max(s2, s0)","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Say you have an array for which the i^th element is the price of a given stock on day i.\r\n\r\nDesign an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times) with the following restrictions:\r\n\r\n\r\n\tYou may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).\r\n\tAfter you sell your stock, you cannot buy stock on next day. (ie, cooldown 1 day)\r\n\r\n\r\nExample:\r\n\r\n\r\nInput: [1,2,3,0,2]\r\nOutput: 3 \r\nExplanation: transactions = [buy, sell, cooldown, buy, sell]\r\n"},{"index":79,"title":"Word Search","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(MN * S)$","space":"$O(MN)$","code":"class Solution:\n def exist(self, board: List[List[str]], word: str) -> bool:\n for i in range(len(board)):\n for j in range(len(board[i])):\n if board[i][j] == word[0] and self.dfs(board, word, i, j):\n return True\n return False \n \n \n def dfs(self, board, word, i, j) -> bool:\n if len(word) == 0:\n return True\n if i < 0 or i >= len(board) or j < 0 or j >= len(board[0]):\n return False\n if word[0] != board[i][j]:\n return False\n temp = board[i][j]\n board[i][j] = '#'\n word = word[1:]\n res = self.dfs(board, word, i, j - 1) \\\n or self.dfs(board, word, i - 1, j) \\\n or self.dfs(board, word, i, j + 1) \\\n or self.dfs(board, word, i + 1, j)\n board[i][j] = temp\n return res\n ","language":"python"},{"time":"$O(MN * S)$","space":"$O(S)$","code":"class Solution:\n def exist(self, board: List[List[str]], word: str) -> bool:\n trace = set()\n for i in range(len(board)):\n for j in range(len(board[i])):\n if board[i][j] == word[0] and self.dfs(board, word, i, j, trace):\n return True\n return False \n \n \n def dfs(self, board, word, i, j, trace) -> bool:\n if len(word) == 0:\n return True\n if (i, j) in trace:\n return False\n if i < 0 or i >= len(board) or j < 0 or j >= len(board[0]):\n return False\n if word[0] != board[i][j]:\n return False\n trace.add((i, j))\n word = word[1:]\n res = self.dfs(board, word, i, j - 1, trace) \\\n or self.dfs(board, word, i - 1, j, trace) \\\n or self.dfs(board, word, i, j + 1, trace) \\\n or self.dfs(board, word, i + 1, j, trace)\n trace.remove((i, j))\n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-search/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"It it obviously a DFS problem. Need to come up with the solution more quickly"},"desc":"Given a 2D board and a word, find if the word exists in the grid.\r\n\r\nThe word can be constructed from letters of sequentially adjacent cell, where \"adjacent\" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.\r\n\r\nExample:\r\n\r\n\r\nboard =\r\n[\r\n ['A','B','C','E'],\r\n ['S','F','C','S'],\r\n ['A','D','E','E']\r\n]\r\n\r\nGiven word = \"ABCCED\", return true.\r\nGiven word = \"SEE\", return true.\r\nGiven word = \"ABCB\", return false.\r\n\r\n"},{"index":437,"title":"Path Sum III","body":{"mySolution":[{"time":"$O(N * D)$ where $D$ is the depth of the tree, in worst case. It could add up to $O(N^2)$","space":"$O(D)$","code":"class Solution:\n def pathSum(self, root: TreeNode, sum: int) -> int:\n stack = []\n res = 0\n def dfs(node):\n if not node:\n return\n stack.append(node.val)\n s = 0\n for i in range(len(stack) - 1, -1, -1):\n s += stack[i]\n nonlocal res\n if s == sum:\n res += 1 \n dfs(node.left)\n dfs(node.right)\n stack.pop(-1)\n \n dfs(root)\n return res","language":"python"}],"optimizedSolution":[{"time":"$O(N)$ where $N$ is the number of nodes","space":"$O(N)$","code":"class Solution:\n def pathSum(self, root: TreeNode, sum: int) -> int:\n # Use a cache to store all the sums possible from the root to the current node\n cache = { 0: 1 }\n res = 0\n def dfs(node, total):\n if not node:\n return \n total += node.val\n # If there is a path available,\n # there must have been an old sum in the cache\n nonlocal res\n res += cache.get(total - sum, 0)\n cache[total] = cache.get(total, 0) + 1\n dfs(node.left, total)\n dfs(node.right, total)\n # After finish the node,\n # this path sum becomes unavailable in the cache\n cache[total] -= 1\n dfs(root, 0)\n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/path-sum-iii/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"You are given a binary tree in which each node contains an integer value.\r\n\r\nFind the number of paths that sum to a given value.\r\n\r\nThe path does not need to start or end at the root or a leaf, but it must go downwards\r\n(traveling only from parent nodes to child nodes).\r\n\r\nThe tree has no more than 1,000 nodes and the values are in the range -1,000,000 to 1,000,000.\r\n\r\nExample:\r\n\r\nroot = [10,5,-3,3,2,null,11,3,-2,null,1], sum = 8\r\n\r\n 10\r\n / \\\r\n 5 -3\r\n / \\ \\\r\n 3 2 11\r\n / \\ \\\r\n3 -2 1\r\n\r\nReturn 3. The paths that sum to 8 are:\r\n\r\n1. 5 -> 3\r\n2. 5 -> 2 -> 1\r\n3. -3 -> 11\r\n\r\n"},{"index":160,"title":"Intersection of Two Linked Lists","body":{"mySolution":[{"time":"$O(M+N)$","space":"$O(1)$","code":"class Solution(object):\n def getIntersectionNode(self, headA, headB):\n \"\"\"\n :type head1, head1: ListNode\n :rtype: ListNode\n \"\"\"\n a, b = headA, headB\n while a and b:\n a = a.next\n b = b.next\n diff = 0\n aorb = 0 if a else 1\n rem = a or b\n while rem:\n rem = rem.next\n diff += 1\n if aorb == 0:\n pre, after = headA, headB\n else:\n pre, after = headB, headA\n while diff > 0:\n pre = pre.next\n diff -= 1\n while pre != after and pre and after:\n pre = pre.next\n after = after.next\n return pre if pre and after else None","language":"python"}],"optimizedSolution":[{"time":"$O(M+N)$","space":"$O(1)$","code":"class Solution(object):\n def getIntersectionNode(self, headA, headB):\n \"\"\"\n :type head1, head1: ListNode\n :rtype: ListNode\n \"\"\"\n a, b = headA, headB\n while a != b:\n a = a.next if a else headB\n b = b.next if b else headA\n return a","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/intersection-of-two-linked-lists/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Write a program to find the node at which the intersection of two singly linked lists begins.\r\n\r\nFor example, the following two linked lists:\r\n\r\n\r\nbegin to intersect at node c1.\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\n\r\nInput: intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3\r\nOutput: Reference of the node with value = 8\r\nInput Explanation: The intersected node's value is 8 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [4,1,8,4,5]. From the head of B, it reads as [5,0,1,8,4,5]. There are 2 nodes before the intersected node in A; There are 3 nodes before the intersected node in B.\r\n\r\n \r\n\r\nExample 2:\r\n\r\n\r\n\r\nInput: intersectVal = 2, listA = [0,9,1,2,4], listB = [3,2,4], skipA = 3, skipB = 1\r\nOutput: Reference of the node with value = 2\r\nInput Explanation: The intersected node's value is 2 (note that this must not be 0 if the two lists intersect). From the head of A, it reads as [0,9,1,2,4]. From the head of B, it reads as [3,2,4]. There are 3 nodes before the intersected node in A; There are 1 node before the intersected node in B.\r\n\r\n\r\n \r\n\r\nExample 3:\r\n\r\n\r\n\r\nInput: intersectVal = 0, listA = [2,6,4], listB = [1,5], skipA = 3, skipB = 2\r\nOutput: null\r\nInput Explanation: From the head of A, it reads as [2,6,4]. From the head of B, it reads as [1,5]. Since the two lists do not intersect, intersectVal must be 0, while skipA and skipB can be arbitrary values.\r\nExplanation: The two lists do not intersect, so return null.\r\n\r\n\r\n \r\n\r\nNotes:\r\n\r\n\r\n\tIf the two linked lists have no intersection at all, return null.\r\n\tThe linked lists must retain their original structure after the function returns.\r\n\tYou may assume there are no cycles anywhere in the entire linked structure.\r\n\tYour code should preferably run in O(n) time and use only O(1) memory.\r\n\r\n"},{"index":8,"title":"String to Integer (atoi)","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Implement atoi which converts a string to an integer.\r\n\r\nThe function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.\r\n\r\nThe string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function.\r\n\r\nIf the first sequence of non-whitespace characters in str is not a valid integral number, or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed.\r\n\r\nIf no valid conversion could be performed, a zero value is returned.\r\n\r\nNote:\r\n\r\n\r\n\tOnly the space character ' ' is considered as whitespace character.\r\n\tAssume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−2^31,  2^31 − 1]. If the numerical value is out of the range of representable values, INT_MAX (2^31 − 1) or INT_MIN (−2^31) is returned.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: \"42\"\r\nOutput: 42\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: \" -42\"\r\nOutput: -42\r\nExplanation: The first non-whitespace character is '-', which is the minus sign.\r\n  Then take as many numerical digits as possible, which gets 42.\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput: \"4193 with words\"\r\nOutput: 4193\r\nExplanation: Conversion stops at digit '3' as the next character is not a numerical digit.\r\n\r\n\r\nExample 4:\r\n\r\n\r\nInput: \"words and 987\"\r\nOutput: 0\r\nExplanation: The first non-whitespace character is 'w', which is not a numerical \r\n  digit or a +/- sign. Therefore no valid conversion could be performed.\r\n\r\nExample 5:\r\n\r\n\r\nInput: \"-91283472332\"\r\nOutput: -2147483648\r\nExplanation: The number \"-91283472332\" is out of the range of a 32-bit signed integer.\r\n  Thefore INT_MIN (−2^31) is returned.\r\n"},{"index":56,"title":"Merge Intervals","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a collection of intervals, merge all overlapping intervals.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [[1,3],[2,6],[8,10],[15,18]]\r\nOutput: [[1,6],[8,10],[15,18]]\r\nExplanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [[1,4],[4,5]]\r\nOutput: [[1,5]]\r\nExplanation: Intervals [1,4] and [4,5] are considered overlapping.\r\n\r\nNOTE: input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.\r\n"},{"index":141,"title":"Linked List Cycle","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"# Definition for singly-linked list.\n# class ListNode(object):\n# def __init__(self, x):\n# self.val = x\n# self.next = None\n\nclass Solution(object):\n def hasCycle(self, head):\n \"\"\"\n :type head: ListNode\n :rtype: bool\n \"\"\"\n if not head: return False\n s = set([head])\n while head.next:\n head = head.next\n if head in s:\n return True\n s.add(head)\n return False\n ","language":"python"},{"time":"$O(N)$","space":"$O(1)$","code":"class Solution(object):\n class Solution(object):\n def hasCycle(self, head):\n \"\"\"\n :type head: ListNode\n :rtype: bool\n \"\"\"\n while head:\n if head.val == '#': return True\n head.val = '#'\n head = head.next\n return False\n ","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution(object):\n def hasCycle(self, head):\n \"\"\"\n :type head: ListNode\n :rtype: bool\n \"\"\"\n slow = fast = head\n while fast and slow:\n if not fast.next: return False\n fast = fast.next.next\n slow = slow.next\n if fast == slow: return True\n return False","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/linked-list-cycle/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Given a linked list, determine if it has a cycle in it.\r\n\r\nTo represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects to. If pos is -1, then there is no cycle in the linked list.\r\n\r\n \r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: head = [3,2,0,-4], pos = 1\r\nOutput: true\r\nExplanation: There is a cycle in the linked list, where tail connects to the second node.\r\n\r\n\r\n\r\n\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: head = [1,2], pos = 0\r\nOutput: true\r\nExplanation: There is a cycle in the linked list, where tail connects to the first node.\r\n\r\n\r\n\r\n\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput: head = [1], pos = -1\r\nOutput: false\r\nExplanation: There is no cycle in the linked list.\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\nFollow up:\r\n\r\nCan you solve it using O(1) (i.e. constant) memory?\r\n"},{"index":37,"title":"Sudoku Solver","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Write a program to solve a Sudoku puzzle by filling the empty cells.\r\n\r\nA sudoku solution must satisfy all of the following rules:\r\n\r\n\r\n\tEach of the digits 1-9 must occur exactly once in each row.\r\n\tEach of the digits 1-9 must occur exactly once in each column.\r\n\tEach of the the digits 1-9 must occur exactly once in each of the 9 3x3 sub-boxes of the grid.\r\n\r\n\r\nEmpty cells are indicated by the character '.'.\r\n\r\n\r\nA sudoku puzzle...\r\n\r\n\r\n...and its solution numbers marked in red.\r\n\r\nNote:\r\n\r\n\r\n\tThe given board contain only digits 1-9 and the character '.'.\r\n\tYou may assume that the given Sudoku puzzle will have a single unique solution.\r\n\tThe given board size is always 9x9.\r\n\r\n"},{"index":48,"title":"Rotate Image","body":{"mySolution":[{"time":"$O(N^2)$","space":"$O(1)$","code":"class Solution:\n def rotate(self, matrix: List[List[int]]) -> None:\n \"\"\"\n Do not return anything, modify matrix in-place instead.\n \"\"\"\n n = len(matrix)\n for i in range(0, n // 2 + 1):\n for j in range(i, n - i - 1):\n matrix[j][n - 1 - i], matrix[n - 1 - i][n - 1 - j], matrix[n - 1 - j][i], matrix[i][j] = \\\n matrix[i][j], matrix[j][n - 1 - i], matrix[n - 1 - i][n - 1 - j], matrix[n - 1 - j][i]\n \n ","language":"python"}],"optimizedSolution":[{"time":"$O(N^2)$","space":"$O(1)$","code":"class Solution:\n def rotate(self, matrix):\n \"\"\"\n :type matrix: List[List[int]]\n :rtype: void Do not return anything, modify matrix in-place instead.\n \"\"\"\n n = len(matrix[0]) \n # transpose matrix\n for i in range(n):\n for j in range(i, n):\n matrix[j][i], matrix[i][j] = matrix[i][j], matrix[j][i] \n \n # reverse each row\n for i in range(n):\n matrix[i].reverse()","language":"python"}],"anki":"1. Dealing four symmtric points at a time. Cycle between the four\n2. Transpose and reverse row","Link":"https://leetcode.com/problems/rotate-image/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"You are given an n x n 2D matrix representing an image.\r\n\r\nRotate the image by 90 degrees (clockwise).\r\n\r\nNote:\r\n\r\nYou have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.\r\n\r\nExample 1:\r\n\r\n\r\nGiven input matrix = \r\n[\r\n [1,2,3],\r\n [4,5,6],\r\n [7,8,9]\r\n],\r\n\r\nrotate the input matrix in-place such that it becomes:\r\n[\r\n [7,4,1],\r\n [8,5,2],\r\n [9,6,3]\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nGiven input matrix =\r\n[\r\n [ 5, 1, 9,11],\r\n [ 2, 4, 8,10],\r\n [13, 3, 6, 7],\r\n [15,14,12,16]\r\n], \r\n\r\nrotate the input matrix in-place such that it becomes:\r\n[\r\n [15,13, 2, 5],\r\n [14, 3, 4, 1],\r\n [12, 6, 8, 9],\r\n [16, 7,10,11]\r\n]\r\n\r\n"},{"index":103,"title":"Binary Tree Zigzag Level Order Traversal","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"from collections import deque\n\nclass Solution:\n def zigzagLevelOrder(self, root: TreeNode) -> List[List[int]]:\n res = []\n q = deque([root])\n flag = False\n while q:\n # Use size to keep track of the number of nodes in one level\n s = len(q)\n level = []\n for _ in range(s):\n if flag:\n node = q.popleft()\n if not node:\n continue\n level.append(node.val)\n q.append(node.right)\n q.append(node.left)\n else:\n node = q.pop()\n if not node:\n continue\n level.append(node.val)\n q.appendleft(node.left)\n q.appendleft(node.right)\n if len(level) > 0:\n res.append(level)\n flag = not flag\n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).\r\n\r\n\r\nFor example:\r\nGiven binary tree [3,9,20,null,null,15,7],\r\n\r\n 3\r\n / \\\r\n 9 20\r\n / \\\r\n 15 7\r\n\r\n\r\n\r\nreturn its zigzag level order traversal as:\r\n\r\n[\r\n [3],\r\n [20,9],\r\n [15,7]\r\n]\r\n\r\n"},{"index":621,"title":"Task Scheduler","body":{"mySolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def leastInterval(self, tasks, N):\n task_counts = collections.Counter(tasks).values()\n # Get the max counts of all the tasks \n M = max(task_counts)\n # The number of tasks of max counts\n Mct = list(task_counts).count(M)\n return max(len(tasks), (M - 1) * (N + 1) + Mct)","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/task-scheduler/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle.\r\n\r\nHowever, there is a non-negative cooling interval n that means between two same tasks, there must be at least n intervals that CPU are doing different tasks or just be idle.\r\n\r\nYou need to return the least number of intervals the CPU will take to finish all the given tasks.\r\n\r\n \r\n\r\nExample:\r\n\r\n\r\nInput: tasks = [\"A\",\"A\",\"A\",\"B\",\"B\",\"B\"], n = 2\r\nOutput: 8\r\nExplanation: A -> B -> idle -> A -> B -> idle -> A -> B.\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\tThe number of tasks is in the range [1, 10000].\r\n\tThe integer n is in the range [0, 100].\r\n\r\n"},{"index":39,"title":"Combination Sum","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.\r\n\r\nThe same repeated number may be chosen from candidates unlimited number of times.\r\n\r\nNote:\r\n\r\n\r\n\tAll numbers (including target) will be positive integers.\r\n\tThe solution set must not contain duplicate combinations.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: candidates = [2,3,6,7], target = 7,\r\nA solution set is:\r\n[\r\n [7],\r\n [2,2,3]\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: candidates = [2,3,5], target = 8,\r\nA solution set is:\r\n[\r\n  [2,2,2,2],\r\n  [2,3,3],\r\n  [3,5]\r\n]\r\n\r\n"},{"index":73,"title":"Set Matrix Zeroes","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.\r\n\r\nExample 1:\r\n\r\n\r\nInput: \r\n[\r\n  [1,1,1],\r\n  [1,0,1],\r\n  [1,1,1]\r\n]\r\nOutput: \r\n[\r\n  [1,0,1],\r\n  [0,0,0],\r\n  [1,0,1]\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: \r\n[\r\n  [0,1,2,0],\r\n  [3,4,5,2],\r\n  [1,3,1,5]\r\n]\r\nOutput: \r\n[\r\n  [0,0,0,0],\r\n  [0,4,5,0],\r\n  [0,3,1,0]\r\n]\r\n\r\n\r\nFollow up:\r\n\r\n\r\n\tA straight forward solution using O(mn) space is probably a bad idea.\r\n\tA simple improvement uses O(m + n) space, but still not the best solution.\r\n\tCould you devise a constant space solution?\r\n\r\n"},{"index":771,"title":"Jewels and Stones","body":{"mySolution":[{"time":"$O(S+J)$","space":"$O(1)$ since there are only (a-z + A-Z) characters will be present in the set","code":"class Solution:\n def numJewelsInStones(self, J: str, S: str) -> int:\n return sum(c in set(J) for c in S)","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/jewels-and-stones/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"You're given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in S is a type of stone you have.  You want to know how many of the stones you have are also jewels.\r\n\r\nThe letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so \"a\" is considered a different type of stone from \"A\".\r\n\r\nExample 1:\r\n\r\n\r\nInput: J = \"aA\", S = \"aAAbbbb\"\r\nOutput: 3\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: J = \"z\", S = \"ZZ\"\r\nOutput: 0\r\n\r\n\r\nNote:\r\n\r\n\r\n\tS and J will consist of letters and have length at most 50.\r\n\tThe characters in J are distinct.\r\n\r\n"},{"index":152,"title":"Maximum Product Subarray","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"class Solution:\n def maxProduct(self, nums: List[int]) -> int:\n if not nums: return 0\n imin = imax = nums[0]\n r = imax\n for i in range(1, len(nums)):\n if nums[i] < 0:\n imin, imax = imax, imin\n imax = max(nums[i], nums[i] * imax)\n imin = min(nums[i], nums[i] * imin)\n r = max(r, imax)\n return r","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/maximum-product-subarray/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [2,3,-2,4]\r\nOutput: 6\r\nExplanation: [2,3] has the largest product 6.\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [-2,0,-1]\r\nOutput: 0\r\nExplanation: The result cannot be 2, because [-2,-1] is not a subarray.\r\n"},{"index":2,"title":"Add Two Numbers","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution {\npublic:\n ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {\n int carrier = 0;\n ListNode* dummy = new ListNode(0);\n ListNode* node = dummy;\n while (l1 || l2 || carrier != 0) {\n if (l1) {\n carrier += l1->val;\n l1 = l1->next;\n }\n if (l2) {\n carrier += l2->val;\n l2 = l2->next;\n }\n node->next = new ListNode(carrier % 10);\n carrier = carrier / 10;\n node = node->next;\n }\n return dummy->next;\n }\n};","language":"cpp"}],"optimizedSolution":[],"anki":"Use a `carrier` and dummy head","Link":"https://leetcode.com/problems/add-two-numbers/","Related":"","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.\r\n\r\nYou may assume the two numbers do not contain any leading zero, except the number 0 itself.\r\n\r\nExample:\r\n\r\n\r\nInput: (2 -> 4 -> 3) + (5 -> 6 -> 4)\r\nOutput: 7 -> 0 -> 8\r\nExplanation: 342 + 465 = 807.\r\n\r\n"},{"index":240,"title":"Search a 2D Matrix II","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(M+N)$","space":"$O(1)$","code":"class Solution:\n def searchMatrix(self, matrix, target):\n if not matrix:\n return False\n \n n = len(matrix)\n m = len(matrix[0])\n \n if n * m == 0:\n return False\n \n # We starting from the bottom-left corner\n i, j = n - 1, 0\n \n while i < n and i > -1 and j < m and j > -1:\n ele = matrix[i][j]\n if ele == target:\n return True\n # If the current element > target\n # we prune the other elements in the ith row on the left\n elif ele > target:\n i -= 1\n # Similarly, if the current element < target\n # we prune the other eleents in the jth row on the top\n else:\n j += 1\n \n # If the pointer is out of the matrix, it means we cannot find the element\n return False","language":"python"},{"time":"$O(nlog(n))$. This could be deducted from the [master theorem](https://en.wikipedia.org/wiki/Master_theorem_(analysis_of_algorithms))","space":"$O(log(n))$ since we discard half of the matrix each time","code":"class Solution:\n def searchMatrix(self, matrix, target):\n if not matrix:\n return False\n \n def search_rec(x, y, end_x, end_y):\n if x > end_x or y > end_y:\n return False\n elif target > matrix[end_x][end_y] or target < matrix[x][y]:\n return False\n start = x\n mid_col = (y + end_y) // 2\n \n # First in the middle column of the matrix, we look for a start index such that\n # matrix[start - 1][mid_col] < target and matrix[start][mid_col] > target\n # If we find the target in this process, we return True\n \n while start <= end_x and matrix[start][mid_col] <= target:\n if matrix[start][mid_col] == target:\n return True\n start += 1\n \n # The matrix is then divided into four parts by the mid_col and start_index\n # We look for the target in the bottom-left and top-right matrix. \n return search_rec(x, mid_col + 1, start - 1, end_y) or search_rec(start, y, end_x, mid_col - 1)\n \n return search_rec(0, 0, len(matrix) - 1, len(matrix[0]) - 1)","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/search-a-2d-matrix-ii/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:\r\n\r\n\r\n\tIntegers in each row are sorted in ascending from left to right.\r\n\tIntegers in each column are sorted in ascending from top to bottom.\r\n\r\n\r\nExample:\r\n\r\nConsider the following matrix:\r\n\r\n\r\n[\r\n [1, 4, 7, 11, 15],\r\n [2, 5, 8, 12, 19],\r\n [3, 6, 9, 16, 22],\r\n [10, 13, 14, 17, 24],\r\n [18, 21, 23, 26, 30]\r\n]\r\n\r\n\r\nGiven target = 5, return true.\r\n\r\nGiven target = 20, return false.\r\n"},{"index":78,"title":"Subsets","body":{"mySolution":[{"time":"$O(2^N)$","space":"$O(2^N)$","code":"class Solution:\n def subsets(self, nums: List[int]) -> List[List[int]]:\n if len(nums) == 0:\n return [[]]\n return self.subsets(nums[1:]) + [([nums[0]] + s) for s in self.subsets(nums[1:])]\n```\n\n**Optimized Solution (I, II, III...)**Jk:\n*Time*: $O(N)$ \n*Space*: $O(N^2)$\n```\nPost the optimized solution after looking at the solution. ","language":""}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/subsets/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Given a set of distinct integers, nums, return all possible subsets (the power set).\r\n\r\nNote: The solution set must not contain duplicate subsets.\r\n\r\nExample:\r\n\r\n\r\nInput: nums = [1,2,3]\r\nOutput:\r\n[\r\n [3],\r\n  [1],\r\n  [2],\r\n  [1,2,3],\r\n  [1,3],\r\n  [2,3],\r\n  [1,2],\r\n  []\r\n]\r\n"},{"index":208,"title":"Implement Trie (Prefix Tree)","body":{"mySolution":[{"time":"$O(N)$ where $N$ is the size of the word","space":"depends on the opearation","code":"class TrieNode:\n def __init__(self):\n self.isEnd = False\n self.next = dict()\n\nclass Trie:\n\n def __init__(self):\n \"\"\"\n Initialize your data structure here.\n \"\"\"\n self.root = TrieNode()\n \n\n def insert(self, word: str) -> None:\n \"\"\"\n Inserts a word into the trie.\n \"\"\"\n node = self.root\n for c in word:\n if c not in node.next:\n node.next[c] = TrieNode()\n node = node.next[c]\n node.isEnd = True\n \n def _search_node(self, word: str):\n node = self.root\n for c in word:\n if c not in node.next:\n return None\n node = node.next[c]\n return node\n \n\n def search(self, word: str) -> bool:\n \"\"\"\n Returns if the word is in the trie.\n \"\"\"\n last_node = self._search_node(word)\n return last_node is not None and last_node.isEnd\n \n\n def startsWith(self, prefix: str) -> bool:\n \"\"\"\n Returns if there is any word in the trie that starts with the given prefix.\n \"\"\"\n return self._search_node(prefix) is not None\n \n\n\n# Your Trie object will be instantiated and called as such:\n# obj = Trie()\n# obj.insert(word)\n# param_2 = obj.search(word)\n# param_3 = obj.startsWith(prefix) ","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post the optimized solution after looking at the solution. ","language":""}],"anki":"","Link":"https://leetcode.com/problems/implement-trie-prefix-tree/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Implement a trie with insert, search, and startsWith methods.\r\n\r\nExample:\r\n\r\n\r\nTrie trie = new Trie();\r\n\r\ntrie.insert(\"apple\");\r\ntrie.search(\"apple\"); // returns true\r\ntrie.search(\"app\"); // returns false\r\ntrie.startsWith(\"app\"); // returns true\r\ntrie.insert(\"app\"); \r\ntrie.search(\"app\"); // returns true\r\n\r\n\r\nNote:\r\n\r\n\r\n\tYou may assume that all inputs are consist of lowercase letters a-z.\r\n\tAll inputs are guaranteed to be non-empty strings.\r\n\r\n"},{"index":126,"title":"Word Ladder II","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(klN)$ where k = 26, l is the length of the words and N is the number of words","space":"$O(N)$","code":"# Original solution from https://leetcode.com/problems/word-ladder-ii/discuss/40477/Super-fast-Java-solution-(two-end-BFS)\nfrom collections import defaultdict\nfrom string import ascii_lowercase\n\nclass Solution:\n def findLadders(self, beginWord: str, endWord: str, wordList: List[str]) -> List[List[str]]:\n next_step = defaultdict(list)\n all_words = set(wordList)\n if endWord not in all_words:\n return []\n source = set([beginWord])\n target = set([endWord])\n self.helper(source, target, all_words, next_step, False)\n result = []\n self.gen_list(result, [], beginWord, endWord, next_step)\n return result\n \n def helper(self, source, target, all_words, next_step, flip):\n next_target = set()\n done = False\n if len(source) == 0 or len(target) == 0:\n return\n \n if len(target) > len(source):\n target, source = source, target\n flip = not flip\n \n # Remove from all_words to avoid repetition\n for word in source:\n if word in all_words:\n all_words.remove(word)\n \n for word in source:\n for i in range(len(word)):\n for c in ascii_lowercase:\n # Fastest way to replace one letter in word\n transformed = word[:i] + c + word[i+1:]\n key, value = word, transformed\n if flip:\n key, value = transformed, word\n \n if transformed in target:\n done = True\n next_step[key].append(value)\n \n if not done and transformed in all_words:\n next_target.add(transformed)\n next_step[key].append(value)\n \n return done or self.helper(target, next_target, all_words, next_step, not flip)\n \n def gen_list(self, res, seq, begin, end, next_step):\n seq.append(begin)\n if begin == end:\n res.append(seq[:])\n for next_word in next_step[begin]:\n self.gen_list(res, seq, next_word, end, next_step)\n seq.pop()","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-ladder-ii/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:\r\n\r\n\r\n\tOnly one letter can be changed at a time\r\n\tEach transformed word must exist in the word list. Note that beginWord is not a transformed word.\r\n\r\n\r\nNote:\r\n\r\n\r\n\tReturn an empty list if there is no such transformation sequence.\r\n\tAll words have the same length.\r\n\tAll words contain only lowercase alphabetic characters.\r\n\tYou may assume no duplicates in the word list.\r\n\tYou may assume beginWord and endWord are non-empty and are not the same.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\nbeginWord = \"hit\",\r\nendWord = \"cog\",\r\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\r\n\r\nOutput:\r\n[\r\n [\"hit\",\"hot\",\"dot\",\"dog\",\"cog\"],\r\n  [\"hit\",\"hot\",\"lot\",\"log\",\"cog\"]\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\nbeginWord = \"hit\"\r\nendWord = \"cog\"\r\nwordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\r\n\r\nOutput: []\r\n\r\nExplanation: The endWord \"cog\" is not in wordList, therefore no possible transformation.\r\n\r\n\r\n\r\n\r\n"},{"index":null,"title":"LeetCode Template","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post my solution here, if solved successfully.","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post the optimized solution after looking at the solution. ","language":""}],"anki":"","Link":"","Related":"","Solved":"- [ ] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":""},{"index":31,"title":"Next Permutation","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.\r\n\r\nIf such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).\r\n\r\nThe replacement must be in-place and use only constant extra memory.\r\n\r\nHere are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column.\r\n\r\n1,2,3 → 1,3,2\r\n3,2,1 → 1,2,3\r\n1,1,5 → 1,5,1\r\n"},{"index":543,"title":"Diameter of Binary Tree","body":{"mySolution":[{"time":"$O(N)$ where $N$ is the number of nodes","space":"$O(N)$","code":"class Solution:\n def diameterOfBinaryTree(self, root: TreeNode) -> int:\n m = 0\n def dfs(node):\n if not node:\n return -1\n \n l = dfs(node.left) + 1\n r = dfs(node.right) + 1\n nonlocal m\n m = max(m, l + r)\n return max(l, r)\n \n dfs(root)\n return m","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/diameter-of-binary-tree/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"\r\nGiven a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.\r\n\r\n\r\n\r\nExample:\r\nGiven a binary tree \r\n\r\n 1\r\n / \\\r\n 2 3\r\n / \\ \r\n 4 5 \r\n\r\n\r\n\r\nReturn 3, which is the length of the path [4,2,1,3] or [5,2,1,3].\r\n\r\n\r\nNote:\r\nThe length of path between two nodes is represented by the number of edges between them.\r\n"},{"index":74,"title":"Search a 2D Matrix","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:\r\n\r\n\r\n\tIntegers in each row are sorted from left to right.\r\n\tThe first integer of each row is greater than the last integer of the previous row.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\nmatrix = [\r\n [1, 3, 5, 7],\r\n [10, 11, 16, 20],\r\n [23, 30, 34, 50]\r\n]\r\ntarget = 3\r\nOutput: true\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\nmatrix = [\r\n [1, 3, 5, 7],\r\n [10, 11, 16, 20],\r\n [23, 30, 34, 50]\r\n]\r\ntarget = 13\r\nOutput: false\r\n"},{"index":5,"title":"Longest Palindromic Substring","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N^2)$","space":"$O(1)$","code":"class Solution {\npublic:\n string longestPalindrome(string s) {\n if (s.length() == 0) {\n return \"\";\n }\n int start = 0, end = 0;\n for (int i = 0; i < s.length() - 1; i++) {\n int len = max(expand(s, i, i), expand(s, i, i + 1));\n if (len > end - start + 1) {\n start = i - (len - 1) / 2;\n end = i + len / 2;\n }\n }\n return s.substr(start, end - start + 1);\n }\n \n int expand(string s, int left, int right) {\n while (left >= 0 && right <= s.length() - 1 && s[left] == s[right]) {\n left--;\n right++;\n }\n return right - left - 1;\n }\n};","language":"cpp"}],"anki":"Expand from center.","Link":"https://leetcode.com/problems/longest-palindromic-substring/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.\r\n\r\nExample 1:\r\n\r\n\r\nInput: \"babad\"\r\nOutput: \"bab\"\r\nNote: \"aba\" is also a valid answer.\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: \"cbbd\"\r\nOutput: \"bb\"\r\n\r\n"},{"index":200,"title":"Number of Islands","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(MN)$","space":"$O(MN)$","code":"class Solution(object):\n def numIslands(self, grid):\n \"\"\"\n :type grid: List[List[str]]\n :rtype: int\n \"\"\"\n cnt = 0\n if not grid: return cnt\n for i in range(len(grid)):\n for j in range(len(grid[0])):\n if grid[i][j] == '1':\n cnt += 1\n self.dfs(grid, i, j)\n return cnt\n \n def dfs(self, grid, i, j):\n if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]):\n return\n if grid[i][j] == '0':\n return\n grid[i][j] = '0'\n self.dfs(grid, i - 1, j)\n self.dfs(grid, i, j - 1)\n self.dfs(grid, i + 1, j)\n self.dfs(grid, i, j + 1)","language":"python"},{"time":"$O(MN)$","space":"$O(M + N)$","code":"from collections import deque\n\nclass Solution(object):\n def numIslands(self, grid):\n \"\"\"\n :type grid: List[List[str]]\n :rtype: int\n \"\"\"\n cnt = 0\n q = deque([])\n if not grid: return cnt\n for i in range(len(grid)):\n for j in range(len(grid[0])):\n if grid[i][j] == '0':\n continue\n \n cnt += 1\n q.append((i, j))\n while q:\n x, y = q.popleft()\n if grid[x][y] == '0':\n continue\n grid[x][y] = '0'\n if x > 0 and grid[x - 1][y] == '1':\n q.append((x - 1, y))\n if y > 0 and grid[x][y - 1] == '1':\n q.append((x, y - 1))\n if x < len(grid) - 1 and grid[x + 1][y] == '1':\n q.append((x + 1, y))\n if y < len(grid[0]) - 1 and grid[x][y + 1] == '1':\n q.append((x, y + 1)) \n return cnt","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/number-of-islands/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\n11110\r\n11010\r\n11000\r\n00000\r\n\r\nOutput: 1\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\n11000\r\n11000\r\n00100\r\n00011\r\n\r\nOutput: 3\r\n"},{"index":273,"title":"Integer to English Words","body":{"mySolution":[{"time":"$O(L)$","space":"$O(1)$","code":"class Solution:\n def __init__(self):\n self.digit_map = {\n 0: ['', 'Ten'],\n 1: ['One', 'Eleven'],\n 2: ['Two', 'Twelve', 'Twenty'],\n 3: ['Three', 'Thirteen', 'Thirty'],\n 4: ['Four', 'Fourteen', 'Forty'],\n 5: ['Five', 'Fifteen', 'Fifty'],\n 6: ['Six', 'Sixteen', 'Sixty'],\n 7: ['Seven', 'Seventeen', 'Seventy'],\n 8: ['Eight', 'Eighteen', 'Eighty'],\n 9: ['Nine', 'Nineteen', 'Ninety'],\n }\n self.depth_map = {\n 1: 'Thousand',\n 2: 'Million',\n 3: 'Billion'\n }\n \n def numberToWords(self, num: int) -> str:\n if num == 0:\n return 'Zero'\n return self.helper(num, 0)\n\n def helper(self, num: int, depth) -> str:\n if num >= 1000:\n first = self.helper(num // 1000, depth + 1)\n second = self.helper(num % 1000, depth)\n return first + ('' if first == '' or second == '' else ' ') + second\n\n hundred = num // 100\n ten = (num - 100 * hundred) // 10\n digit = num % 10\n res = []\n if hundred > 0:\n res.append(self.digit_map[hundred][0])\n res.append('Hundred')\n if ten > 0:\n if ten == 1:\n res.append(self.digit_map[digit][1])\n else:\n res.append(self.digit_map[ten][2])\n if ten != 1 and digit > 0:\n res.append(self.digit_map[digit][0])\n \n if depth > 0 and len(res) > 0:\n res.append(self.depth_map[depth])\n \n return ' '.join(res)\n","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/integer-to-english-words/","Related":"","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":"* 0\n* 1000\n* 1000000\n* 1000000001"},"desc":"Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 2^31 - 1.\r\n\r\nExample 1:\r\n\r\n\r\nInput: 123\r\nOutput: \"One Hundred Twenty Three\"\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: 12345\r\nOutput: \"Twelve Thousand Three Hundred Forty Five\"\r\n\r\nExample 3:\r\n\r\n\r\nInput: 1234567\r\nOutput: \"One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven\"\r\n\r\n\r\nExample 4:\r\n\r\n\r\nInput: 1234567891\r\nOutput: \"One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety One\"\r\n\r\n"},{"index":44,"title":"Wildcard Matching","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'.\r\n\r\n\r\n'?' Matches any single character.\r\n'*' Matches any sequence of characters (including the empty sequence).\r\n\r\n\r\nThe matching should cover the entire input string (not partial).\r\n\r\nNote:\r\n\r\n\r\n\ts could be empty and contains only lowercase letters a-z.\r\n\tp could be empty and contains only lowercase letters a-z, and characters like ? or *.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\ns = \"aa\"\r\np = \"a\"\r\nOutput: false\r\nExplanation: \"a\" does not match the entire string \"aa\".\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\ns = \"aa\"\r\np = \"*\"\r\nOutput: true\r\nExplanation: '*' matches any sequence.\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput:\r\ns = \"cb\"\r\np = \"?a\"\r\nOutput: false\r\nExplanation: '?' matches 'c', but the second letter is 'a', which does not match 'b'.\r\n\r\n\r\nExample 4:\r\n\r\n\r\nInput:\r\ns = \"adceb\"\r\np = \"*a*b\"\r\nOutput: true\r\nExplanation: The first '*' matches the empty sequence, while the second '*' matches the substring \"dce\".\r\n\r\n\r\nExample 5:\r\n\r\n\r\nInput:\r\ns = \"acdcb\"\r\np = \"a*c?b\"\r\nOutput: false\r\n\r\n"},{"index":46,"title":"Permutations","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N!)$","space":"$O(1)$","code":"class Solution:\n def permute(self, nums: List[int]) -> List[List[int]]:\n res = []\n def perm(begin):\n if begin == len(nums) - 1:\n res.append(nums[:])\n return\n for i in range(begin, len(nums)):\n nums[i], nums[begin] = nums[begin], nums[i]\n perm(begin + 1)\n nums[i], nums[begin] = nums[begin], nums[i]\n perm(0)\n return res","language":"python"}],"anki":"Recursive solution. For a list `nums`, and a permutation functin `permute()`, the whole set of permutation can be considered as:\n- $[nums[0], permute(nums[1:])]$\n- $[nums[1], permute(nums[0] + nums[2:])]$\n- $[nums[2], permute(nums[0, 1] + nums[3:])]$\n\nSo we swap the $i$th number of the list with the `begin`, and then permute the rest. If `begin` is equal to `len(nums) - 1`, we'll create a copy of the list and push it into the result.\n\nSince a list of length $N$ has $N!$ permutations, the time complexity must be $O(N!)$. Clearly the space complexity is $O(1)$.","Link":"https://leetcode.com/problems/permutations/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given a collection of distinct integers, return all possible permutations.\r\n\r\nExample:\r\n\r\n\r\nInput: [1,2,3]\r\nOutput:\r\n[\r\n [1,2,3],\r\n [1,3,2],\r\n [2,1,3],\r\n [2,3,1],\r\n [3,1,2],\r\n [3,2,1]\r\n]\r\n\r\n"},{"index":207,"title":"Course Schedule","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(V+E)$ where $V$ is the number of vertices and $E$ is the number of edges","space":"$O(V+E)$","code":"from collections import deque\n\nclass Solution:\n def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:\n graph = [[] for _ in range(numCourses)]\n indegree = [0] * numCourses\n for x, y in prerequisites:\n graph[x].append(y)\n indegree[y] += 1\n \n q = deque([x for x in range(numCourses) if indegree[x] == 0])\n visited = 0\n while q:\n v = q.popleft()\n visited += 1\n for after in graph[v]:\n indegree[after] -= 1\n if indegree[after] == 0:\n q.append(after)\n \n return visited == numCourses ","language":"python"},{"time":"$O(V+E)$ where $V$ is the number of vertices and $E$ is the number of edges","space":"$O(V+E)$","code":"class Solution:\n def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:\n graph = [[] for _ in range(numCourses)]\n visit = [0] * numCourses\n for x, y in prerequisites:\n graph[x].append(y)\n def dfs(i):\n if visit[i] == 1: return True\n if visit[i] == -1: return False\n visit[i] = -1\n for e in graph[i]:\n if not dfs(e):\n return False\n visit[i] = 1\n return True\n for c in range(numCourses):\n if not dfs(c):\n return False\n return True","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/course-schedule/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"There are a total of n courses you have to take, labeled from 0 to n-1.\r\n\r\nSome courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]\r\n\r\nGiven the total number of courses and a list of prerequisite pairs, is it possible for you to finish all courses?\r\n\r\nExample 1:\r\n\r\n\r\nInput: 2, [[1,0]] \r\nOutput: true\r\nExplanation: There are a total of 2 courses to take. \r\n  To take course 1 you should have finished course 0. So it is possible.\r\n\r\nExample 2:\r\n\r\n\r\nInput: 2, [[1,0],[0,1]]\r\nOutput: false\r\nExplanation: There are a total of 2 courses to take. \r\n  To take course 1 you should have finished course 0, and to take course 0 you should\r\n  also have finished course 1. So it is impossible.\r\n\r\n\r\nNote:\r\n\r\n\r\n\tThe input prerequisites is a graph represented by a list of edges, not adjacency matrices. Read more about how a graph is represented.\r\n\tYou may assume that there are no duplicate edges in the input prerequisites.\r\n\r\n"},{"index":76,"title":"Minimum Window Substring","body":{"mySolution":[{"time":"$O(S + T)$ where $S$ and $T$ are the lengths of the two strings","space":"$O(T)$","code":"class Solution:\n def minWindow(self, s: str, t: str) -> str:\n record = dict()\n cur = dict()\n for c in t:\n record[c] = record[c] + 1 if c in record else 1\n cur[c] = 0\n\n right= left = 0\n ans = (len(s) + 1, 0, 0)\n matched = 0\n char_num = len(record)\n\n while right < len(s):\n c = s[right]\n if c in cur:\n cur[c] += 1\n matched += cur[c] == record[c]\n while matched == char_num:\n c = s[left]\n if c in cur:\n cur[c] -= 1\n matched -= cur[c] < record[c]\n if matched < char_num:\n if right - left + 1 < ans[0]:\n ans = (right - left + 1, left, right)\n left += 1\n right += 1\n \n return s[ans[1]:ans[2] + 1] if ans[0] <= len(s) else ''","language":"python"}],"optimizedSolution":[{"time":"$O(FILTER + T)$","space":"$O(T)$","code":"class Solution:\n def minWindow(self, s: str, t: str) -> str:\n record = dict()\n cur = dict()\n for c in t:\n record[c] = record[c] + 1 if c in record else 1\n cur[c] = 0\n \n # f for filtered\n f = [(i, c) for i, c in enumerate(s) if c in t]\n\n right= left = 0\n ans = (len(s) + 1, 0, 0)\n matched = 0\n char_num = len(record)\n\n while right < len(f):\n c = f[right][1]\n if c in cur:\n cur[c] += 1\n matched += cur[c] == record[c]\n while matched == char_num:\n c = f[left][1]\n if c in cur:\n cur[c] -= 1\n matched -= cur[c] < record[c]\n if matched < char_num:\n real_right = f[right][0]\n real_left = f[left][0]\n if real_right - real_left + 1 < ans[0]:\n ans = (real_right - real_left + 1, real_left, real_right)\n left += 1\n right += 1\n \n return s[ans[1]:ans[2] + 1] if ans[0] <= len(s) else ''","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/minimum-window-substring/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":"I have come up with the sliding window method but found it difficult to implement."},"desc":"Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).\r\n\r\nExample:\r\n\r\n\r\nInput: S = \"ADOBECODEBANC\", T = \"ABC\"\r\nOutput: \"BANC\"\r\n\r\n\r\nNote:\r\n\r\n\r\n\tIf there is no such window in S that covers all characters in T, return the empty string \"\".\r\n\tIf there is such window, you are guaranteed that there will always be only one unique minimum window in S.\r\n\r\n"},{"index":642,"title":"Design Search Autocomplete System","body":{"mySolution":[],"optimizedSolution":[{"time":"$??$","space":"$??$","code":"// TODO: save disk usage\n// TODO: time and complexity analysis\n// TODO: using make_heap? list for priority queue?\ntypedef pair PSI;\n\nclass TrieNode {\npublic:\n unordered_map children;\n bool isEnd;\n int hitTimes;\n TrieNode() : children(), isEnd(false), hitTimes(0) {};\n};\n\nclass NodeCompare\n{\npublic:\n bool operator() (PSI& a, PSI& b)\n {\n if (a.second == b.second) {\n return a.first.compare(b.first) > 0;\n }\n return a.second < b.second;\n }\n};\n\ntypedef priority_queue, NodeCompare> PQPSI;\n\nclass AutocompleteSystem {\npublic:\n TrieNode *root, *curNode;\n string curString;\n \n AutocompleteSystem(vector& sentences, vector& times)\n : curString(\"\")\n {\n root = new TrieNode();\n curNode = root;\n for (int i = 0; i < sentences.size(); i++) {\n insert(sentences[i], times[i]);\n }\n }\n \n ~AutocompleteSystem() {\n removePtr(root);\n }\n \n void removePtr(TrieNode* node) {\n for (auto it = node->children.begin(); it != node->children.end(); it++) {\n removePtr(it->second);\n }\n delete node;\n }\n \n void insert(string& sentence, int time) {\n TrieNode* node = root;\n for (int i = 0; i < sentence.size(); i++) {\n char c = sentence[i];\n if (node->children.find(c) == node->children.end()) {\n node->children[c] = new TrieNode();\n }\n node = node->children[c];\n if (i == sentence.size() - 1) {\n node->isEnd = true;\n node->hitTimes += time;\n }\n }\n }\n \n vector input(char c) {\n if (c == '#') {\n curNode->isEnd = true;\n curNode->hitTimes += 1;\n curString = \"\";\n curNode = root;\n return {};\n }\n // Not registered before\n if (curNode->children.find(c) == curNode->children.end()) {\n curNode->children[c] = new TrieNode();\n }\n curNode = curNode->children[c];\n curString += c;\n PQPSI pq;\n dfs(curNode, curString, pq);\n int i = 0;\n vector result;\n while (i < 3 && !pq.empty()) {\n result.push_back(pq.top().first);\n pq.pop();\n i++;\n }\n return result;\n }\n \n void dfs(TrieNode* node, string str, PQPSI& pq) {\n if (node->isEnd) {\n pq.push(make_pair(str, node->hitTimes));\n }\n for (auto it = node->children.begin(); it != node->children.end(); it++) {\n char c = it->first;\n dfs(node->children[c], str + c, pq);\n }\n }\n};","language":"cpp"}],"anki":"","Link":"https://leetcode.com/problems/design-search-autocomplete-system/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Design a search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). For each character they type except '#', you need to return the top 3 historical hot sentences that have prefix the same as the part of sentence already typed. Here are the specific rules:\r\n\r\n\r\n\tThe hot degree for a sentence is defined as the number of times a user typed the exactly same sentence before.\r\n\tThe returned top 3 hot sentences should be sorted by hot degree (The first is the hottest one). If several sentences have the same degree of hot, you need to use ASCII-code order (smaller one appears first).\r\n\tIf less than 3 hot sentences exist, then just return as many as you can.\r\n\tWhen the input is a special character, it means the sentence ends, and in this case, you need to return an empty list.\r\n\r\n\r\nYour job is to implement the following functions:\r\n\r\nThe constructor function:\r\n\r\nAutocompleteSystem(String[] sentences, int[] times): This is the constructor. The input is historical data. Sentences is a string array consists of previously typed sentences. Times is the corresponding times a sentence has been typed. Your system should record these historical data.\r\n\r\nNow, the user wants to input a new sentence. The following function will provide the next character the user types:\r\n\r\nList input(char c): The input c is the next character typed by the user. The character will only be lower-case letters ('a' to 'z'), blank space (' ') or a special character ('#'). Also, the previously typed sentence should be recorded in your system. The output will be the top 3 historical hot sentences that have prefix the same as the part of sentence already typed.\r\n \r\n\r\nExample:\r\nOperation: AutocompleteSystem([\"i love you\", \"island\",\"ironman\", \"i love leetcode\"], [5,3,2,2])\r\nThe system have already tracked down the following sentences and their corresponding times:\r\n\"i love you\" : 5 times\r\n\"island\" : 3 times\r\n\"ironman\" : 2 times\r\n\"i love leetcode\" : 2 times\r\nNow, the user begins another search:\r\n\r\nOperation: input('i')\r\nOutput: [\"i love you\", \"island\",\"i love leetcode\"]\r\nExplanation:\r\nThere are four sentences that have prefix \"i\". Among them, \"ironman\" and \"i love leetcode\" have same hot degree. Since ' ' has ASCII code 32 and 'r' has ASCII code 114, \"i love leetcode\" should be in front of \"ironman\". Also we only need to output top 3 hot sentences, so \"ironman\" will be ignored.\r\n\r\nOperation: input(' ')\r\nOutput: [\"i love you\",\"i love leetcode\"]\r\nExplanation:\r\nThere are only two sentences that have prefix \"i \".\r\n\r\nOperation: input('a')\r\nOutput: []\r\nExplanation:\r\nThere are no sentences that have prefix \"i a\".\r\n\r\nOperation: input('#')\r\nOutput: []\r\nExplanation:\r\nThe user finished the input, the sentence \"i a\" should be saved as a historical sentence in system. And the following input will be counted as a new search.\r\n \r\n\r\nNote:\r\n\r\n\r\n\tThe input sentence will always start with a letter and end with '#', and only one blank space will exist between two words.\r\n\tThe number of complete sentences that to be searched won't exceed 100. The length of each sentence including those in the historical data won't exceed 100.\r\n\tPlease use double-quote instead of single-quote when you write test cases even for a character input.\r\n\tPlease remember to RESET your class variables declared in class AutocompleteSystem, as static/class variables are persisted across multiple test cases. Please see here for more details.\r\n\r\n\r\n \r\n"},{"index":394,"title":"Decode String","body":{"mySolution":[{"time":"$O(N^2)$ in worst case","space":"$O(1)$","code":"class Solution:\n def decodeString(self, s: str) -> str:\n output = ''\n i = 0\n while i < len(s):\n if s[i].isdigit():\n numStart = i\n # Be careful when the number is multi-digit\n while s[i].isdigit():\n i += 1\n num = int(s[numStart:i])\n start = i\n layer = 0\n # Bracket in bracket\n while i < len(s):\n if s[i] == '[':\n layer += 1\n elif s[i] == ']':\n layer -= 1\n if layer == 0:\n break\n i += 1\n\n output += num * self.decodeString(s[start + 1:i])\n else:\n output += s[i]\n \n i += 1\n \n return output","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def decodeString(self, s: str) -> str:\n stack = [['', 1]]\n num = ''\n for c in s:\n if c.isdigit():\n num += c\n elif c == '[':\n stack.append(['', int(num)])\n num = ''\n elif c == ']':\n st, times = stack.pop(-1)\n stack[-1][0] += st * times\n else:\n stack[-1][0] += c\n return stack[-1][0]","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/decode-string/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an encoded string, return its decoded string.\n\nThe encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer.\n\nYou may assume that the input string is always valid; No extra white spaces, square brackets are well-formed, etc.\n\nFurthermore, you may assume that the original data does not contain any digits and that digits are only for those repeat numbers, k. For example, there won't be input like 3a or 2[4].\n\nExamples:\n\n\ns = \"3[a]2[bc]\", return \"aaabcbc\".\ns = \"3[a2[c]]\", return \"accaccacc\".\ns = \"2[abc]3[cd]ef\", return \"abcabccdcdcdef\".\n\n\n \n"},{"index":236,"title":"Lowest Common Ancestor of a Binary Tree","body":{"mySolution":[{"time":"$O(N)$ where $N$ is the total number of nodes","space":"$O(N)$ in worst case, the depth is equal to the number of nodes","code":"class Solution:\n def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':\n lowest = root\n max_dep = 0\n def hasPQ(node, depth):\n if not node: return (False, False)\n pl, ql = hasPQ(node.left, depth + 1)\n pr, qr = hasPQ(node.right, depth + 1)\n res = (node == p or pl or pr, node == q or ql or qr)\n nonlocal max_dep\n nonlocal lowest\n if res[0] and res[1] and depth > max_dep:\n max_dep = depth\n lowest = node\n return res\n hasPQ(root, 0)\n return lowest","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def lowestCommonAncestor(self, root, p, q):\n self.ans = root\n def recurse_tree(current_node):\n\n # If reached the end of a branch, return False.\n if not current_node:\n return False\n\n # Left Recursion\n left = recurse_tree(current_node.left)\n\n # Right Recursion\n right = recurse_tree(current_node.right)\n\n # If the current node is one of p or q\n mid = current_node == p or current_node == q\n\n # If any two of the three flags left, right or mid become True.\n if mid + left + right >= 2:\n self.ans = current_node\n\n # Return True if either of the three bool values is True.\n return mid or left or right\n\n # Traverse the tree\n recurse_tree(root)\n return self.ans","language":"python3"}],"anki":"","Link":"https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":"What I thought about this problem"},"desc":"Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.\r\n\r\nAccording to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).”\r\n\r\nGiven the following binary tree:  root = [3,5,1,6,2,0,8,null,null,7,4]\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\nInput: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1\r\nOutput: 3\r\nExplanation: The LCA of nodes 5 and 1 is 3.\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4\r\nOutput: 5\r\nExplanation: The LCA of nodes 5 and 4 is 5, since a node can be a descendant of itself according to the LCA definition.\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\tAll of the nodes' values will be unique.\r\n\tp and q are different and both values will exist in the binary tree.\r\n\r\n"},{"index":140,"title":"Word Break II","body":{"mySolution":[{"time":"$O(??)$","space":"$O(??)$","code":"# This got TLE\nfrom collections import defaultdict\n\nclass Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> List[str]:\n graph = defaultdict(list)\n word_set = set(wordDict)\n dp = [False] * (len(s) + 1)\n dp[0] = True\n # dp[j] represents whether s[:j] can be represented by the dict\n # dp[0] is considered to be true\n for i in range(len(s)):\n for j in range(i + 1):\n if dp[j] and s[j:i+1] in word_set:\n dp[i + 1] = True\n graph[j].append(i + 1)\n \n res = []\n self.dfs(0, graph, s, [], res)\n return res\n \n def dfs(self, current, graph, s, arr, res):\n if current == len(s):\n res.append(' '.join(arr))\n return\n \n if current not in graph:\n return\n \n for next in graph[current]:\n arr.append(s[current:next])\n self.dfs(next, graph, s, arr, res)\n arr.pop()","language":"python"}],"optimizedSolution":[{"time":"$O(??)$","space":"$O(??)$","code":"class Solution:\n def wordBreak(self, s, wordDict):\n return self.helper(s, wordDict, {})\n\n def helper(self, s, wordDict, memo):\n if s in memo:\n return memo[s]\n \n if len(s) == 0:\n return ['']\n \n res = []\n for word in wordDict:\n if not s.startswith(word):\n continue\n if len(word) == len(s):\n res.append(word)\n else:\n resultOfTheRest = self.helper(s[len(word):], wordDict, memo)\n for item in resultOfTheRest:\n item = word + ' ' + item\n res.append(item)\n memo[s] = res\n return res","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/word-break-ii/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences.\r\n\r\nNote:\r\n\r\n\r\n\tThe same word in the dictionary may be reused multiple times in the segmentation.\r\n\tYou may assume the dictionary does not contain duplicate words.\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput:\r\ns = \"catsanddog\"\r\nwordDict = [\"cat\", \"cats\", \"and\", \"sand\", \"dog\"]\r\nOutput:\r\n[\r\n  \"cats and dog\",\r\n  \"cat sand dog\"\r\n]\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput:\r\ns = \"pineapplepenapple\"\r\nwordDict = [\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"]\r\nOutput:\r\n[\r\n  \"pine apple pen apple\",\r\n  \"pineapple pen apple\",\r\n  \"pine applepen apple\"\r\n]\r\nExplanation: Note that you are allowed to reuse a dictionary word.\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput:\r\ns = \"catsandog\"\r\nwordDict = [\"cats\", \"dog\", \"sand\", \"and\", \"cat\"]\r\nOutput:\r\n[]\r\n"},{"index":314,"title":"Binary Tree Vertical Order Traversal","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"from collections import deque\n\nclass Solution:\n def verticalOrder(self, root: TreeNode) -> List[List[int]]:\n if not root:\n return []\n left = []\n mid = []\n right = []\n q = deque([(root, 0)])\n while q:\n node, col = q.popleft()\n if col == 0:\n mid.append(node.val)\n else:\n target = right\n ind = col\n if col < 0:\n target = left\n ind = -col\n if len(target) < ind:\n target.append([])\n \n target[ind - 1].append(node.val)\n \n if node.left:\n q.append((node.left, col - 1))\n \n if node.right:\n q.append((node.right, col + 1))\n \n left.reverse()\n return left + [mid] + right\n ","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/binary-tree-vertical-order-traversal/","Related":"","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":"Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column).\r\n\r\nIf two nodes are in the same row and column, the order should be from left to right.\r\n\r\nExamples 1:\r\n\r\n\r\nInput: [3,9,20,null,null,15,7]\r\n\r\n 3\r\n /\\\r\n / \\\r\n 9 20\r\n /\\\r\n / \\\r\n 15 7 \r\n\r\nOutput:\r\n\r\n[\r\n [9],\r\n [3,15],\r\n [20],\r\n [7]\r\n]\r\n\r\n\r\nExamples 2:\r\n\r\n\r\nInput: [3,9,8,4,0,1,7]\r\n\r\n 3\r\n /\\\r\n / \\\r\n 9 8\r\n /\\ /\\\r\n / \\/ \\\r\n 4 01 7 \r\n\r\nOutput:\r\n\r\n[\r\n [4],\r\n [9],\r\n [3,0,1],\r\n [8],\r\n [7]\r\n]\r\n\r\n\r\nExamples 3:\r\n\r\n\r\nInput: [3,9,8,4,0,1,7,null,null,null,2,5] (0's right child is 2 and 1's left child is 5)\r\n\r\n 3\r\n /\\\r\n / \\\r\n 9 8\r\n /\\ /\\\r\n / \\/ \\\r\n 4 01 7\r\n /\\\r\n / \\\r\n 5 2\r\n\r\nOutput:\r\n\r\n[\r\n [4],\r\n [9,5],\r\n [3,0,1],\r\n [8,2],\r\n [7]\r\n]\r\n\r\n"},{"index":739,"title":"Daily Temperatures","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def dailyTemperatures(self, T: List[int]) -> List[int]:\n stack = []\n res = [0] * len(T)\n # The stack keeps track of the last peak\n # and anything after the peak\n for i in range(len(T) - 1, -1, -1):\n # We will discard anything before the peak since it cannot be the next warmer day\n while stack and T[stack[-1]] <= T[i]:\n stack.pop()\n if stack:\n res[i] = stack[-1] - i\n\n stack.append(i)\n return res","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/daily-temperatures/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"\r\nGiven a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead.\r\n\r\nFor example, given the list of temperatures T = [73, 74, 75, 71, 69, 72, 76, 73], your output should be [1, 1, 4, 2, 1, 1, 0, 0].\r\n\r\n\r\nNote:\r\nThe length of temperatures will be in the range [1, 30000].\r\nEach temperature will be an integer in the range [30, 100].\r\n"},{"index":89,"title":"Gray Code","body":{"mySolution":[{"time":"$O(2^N)$","space":"$O(N)$","code":"class Solution:\n # Recursive\n def grayCode(self, n: int) -> List[int]:\n if n == 0:\n return [0]\n t = 1 << (n - 1)\n l = self.grayCode(n - 1) + [0] * t\n for i in range(t):\n l[-i - 1] = l[i] + t\n return l","language":"python"},{"time":"$O(2^N)$","space":"$O(N)$","code":"class Solution:\n # Iterative\n def grayCode(self, n: int) -> List[int]:\n res = [0] * (1 << n)\n if n == 0:\n return res\n for i in range(n):\n power = 1 << i\n for j in range(power):\n res[j + power] = res[power - 1 - j] + power\n return res","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post the optimized solution after looking at the solution. ","language":""}],"anki":"","Link":"https://leetcode.com/problems/gray-code/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"The gray code is a binary numeral system where two successive values differ in only one bit.\r\n\r\nGiven a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.\r\n\r\nExample 1:\r\n\r\n\r\nInput: 2\r\nOutput: [0,1,3,2]\r\nExplanation:\r\n00 - 0\r\n01 - 1\r\n11 - 3\r\n10 - 2\r\n\r\nFor a given n, a gray code sequence may not be uniquely defined.\r\nFor example, [0,2,3,1] is also a valid gray code sequence.\r\n\r\n00 - 0\r\n10 - 2\r\n11 - 3\r\n01 - 1\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: 0\r\nOutput: [0]\r\nExplanation: We define the gray code sequence to begin with 0.\r\n  A gray code sequence of n has size = 2^n, which for n = 0 the size is 2^0 = 1.\r\n  Therefore, for n = 0 the gray code sequence is [0].\r\n\r\n"},{"index":49,"title":"Group Anagrams","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N * K)$ where $K$ is the maximum length of each str","space":"$O(N)$","code":"class Solution(object):\n def groupAnagrams(self, strs):\n ans = collections.defaultdict(list)\n for s in strs:\n count = [0] * 26\n for c in s:\n count[ord(c) - ord('a')] += 1\n ans[tuple(count)].append(s)\n return ans.values()\n ","language":"python"}],"anki":"The key is find a way to store the number that each letter appears. Different data structures will be used in different languages\n1. For python, we could use a defaultlist(dict) with tuple of length 26 as the key\n2. For cpp, we could use a string of counts separated by '#' as the key","Link":"https://leetcode.com/problems/group-anagrams/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given an array of strings, group anagrams together.\r\n\r\nExample:\r\n\r\n\r\nInput: [\"eat\", \"tea\", \"tan\", \"ate\", \"nat\", \"bat\"],\r\nOutput:\r\n[\r\n [\"ate\",\"eat\",\"tea\"],\r\n [\"nat\",\"tan\"],\r\n [\"bat\"]\r\n]\r\n\r\nNote:\r\n\r\n\r\n\tAll inputs will be in lowercase.\r\n\tThe order of your output does not matter.\r\n\r\n"},{"index":96,"title":"Unique Binary Search Trees","body":{"mySolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"class Solution:\n def numTrees(self, n: int) -> int:\n dp = [0] * (n + 1)\n dp[0] = dp[1] = 1\n for i in range(2, n + 1):\n half_i = i // 2\n for j in range(0, half_i):\n dp[i] += 2 * dp[j] * dp[i - 1 - j]\n dp[i] += (i % 2) * dp[half_i] * dp[half_i]\n return dp[n]","language":"python"}],"optimizedSolution":[],"anki":"","Link":"https://leetcode.com/problems/unique-binary-search-trees/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n?\r\n\r\nExample:\r\n\r\n\r\nInput: 3\r\nOutput: 5\r\nExplanation:\r\nGiven n = 3, there are a total of 5 unique BST's:\r\n\r\n 1 3 3 2 1\r\n \\ / / / \\ \\\r\n 3 2 1 1 3 2\r\n / / \\ \\\r\n 2 1 2 3\r\n\r\n"},{"index":416,"title":"Partition Equal Subset Sum","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"class Solution(object):\n def canPartition(self, nums):\n sum_val = sum(nums)\n if sum_val % 2 == 1:\n return False\n target = sum_val // 2\n # We use dp[j] to store whether j can be summed to\n dp = [False] * (sum_val + 1)\n dp[0] = True\n for num in nums:\n next_dp = [False] * (sum_val + 1)\n for j in xrange(len(dp)):\n if dp[j]:\n next_dp[j + num] = True\n next_dp[j] = True\n dp = next_dp\n return dp[target]","language":""},{"time":"$O(N)$","space":"$O(S)$ where $S$ is the sum of the array","code":"class Solution:\n def canPartition(self, nums: List[int]) -> bool:\n s = 0\n b = 1\n for n in nums:\n s += n\n b |= b << n\n if s % 2 == 1:\n return False\n return (b >> s // 2) & 1 == 1","language":""}],"anki":"","Link":"https://leetcode.com/problems/partition-equal-subset-sum/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.\r\n\r\nNote:\r\n\r\n\r\n\tEach of the array element will not exceed 100.\r\n\tThe array size will not exceed 200.\r\n\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\nInput: [1, 5, 11, 5]\r\n\r\nOutput: true\r\n\r\nExplanation: The array can be partitioned as [1, 5, 5] and [11].\r\n\r\n\r\n \r\n\r\nExample 2:\r\n\r\n\r\nInput: [1, 2, 3, 5]\r\n\r\nOutput: false\r\n\r\nExplanation: The array cannot be partitioned into equal sum subsets.\r\n\r\n\r\n \r\n"},{},{"index":138,"title":"Copy List with Random Pointer","body":{"mySolution":[{"time":"$O(N)$","space":"$O(1)$","code":"\"\"\"\n# Definition for a Node.\nclass Node:\n def __init__(self, val, next, random):\n self.val = val\n self.next = next\n self.random = random\n\"\"\"\nclass Solution:\n def copyRandomList(self, head: 'Node') -> 'Node':\n dummy = node = Node(None, None, None)\n while head:\n node.next = Node(head.val, head.next, head.random)\n node = node.next\n head.copy = node\n head = head.next\n \n node = dummy.next\n while node:\n if node.random:\n node.random = node.random.copy\n node = node.next\n \n return dummy.next","language":"python"}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"","language":""}],"anki":"","Link":"https://leetcode.com/problems/copy-list-with-random-pointer/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [x] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.\r\n\r\nReturn a deep copy of the list.\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\n\r\n\r\nInput:\r\n{\"$id\":\"1\",\"next\":{\"$id\":\"2\",\"next\":null,\"random\":{\"$ref\":\"2\"},\"val\":2},\"random\":{\"$ref\":\"2\"},\"val\":1}\r\n\r\nExplanation:\r\nNode 1's value is 1, both of its next and random pointer points to Node 2.\r\nNode 2's value is 2, its next pointer points to null and its random pointer points to itself.\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\tYou must return the copy of the given head as a reference to the cloned list.\r\n\r\n"},{"index":560,"title":"Subarray Sum Equals K","body":{"mySolution":[{"time":"","space":"","code":"","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def subarraySum(self, nums: List[int], k: int) -> int:\n m = { 0: 1 }\n s = count = 0\n for n in nums:\n s += n\n # sum(i, j) = cum(j) - cum(i)j\n if s - k in m:\n count += m[s - k]\n # Store the count of cumulative sums in the dict\n m[s] = m.get(s, 0) + 1\n\n return count","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/subarray-sum-equals-k/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Thinking":""},"desc":"Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.\r\n\r\nExample 1:\r\n\r\nInput:nums = [1,1,1], k = 2\r\nOutput: 2\r\n\r\n\r\n\r\nNote:\r\n\r\nThe length of the array is in range [1, 20,000].\r\nThe range of numbers in the array is [-1000, 1000] and the range of the integer k is [-1e7, 1e7].\r\n\r\n\r\n"},{"index":72,"title":"Edit Distance","body":{"mySolution":[{"time":"$O(N * M)$ where $N$ and $M$ are the lengths of the two words respectively","space":"$O(N * M)$","code":"class Solution:\n def minDistance(self, word1: str, word2: str) -> int:\n l1 = len(word1)\n l2 = len(word2)\n\n dp = [[0] * (l2 + 1) for _ in range(l1 + 1)]\n\n for i in range(l1 + 1): dp[i][0] = i\n for j in range(l2 + 1): dp[0][j] = j\n\n for i in range(1, l1 + 1):\n for j in range(1, l2 + 1):\n addition = dp[i][j - 1] + 1\n deletion = dp[i - 1][j] + 1\n replace = dp[i - 1][j - 1]\n if word1[i - 1] != word2[j - 1]:\n replace += 1\n dp[i][j] = min(addition, deletion, replace)\n\n return dp[l1][l2]","language":"python"}],"optimizedSolution":[{"time":"$O(N * M)$","space":"$O(min(N, M))$","code":"class Solution:\n def minDistance(self, word1: str, word2: str) -> int:\n if len(word2) > len(word1):\n word1, word2 = word2, word1\n \n l1 = len(word1)\n l2 = len(word2)\n\n dp = [0] * (l2 + 1)\n\n for j in range(l2 + 1): dp[j] = j\n\n for i in range(1, l1 + 1):\n temp = dp[0]\n dp[0] = i\n for j in range(1, l2 + 1):\n addition = dp[j - 1] + 1\n deletion = dp[j] + 1\n replace = temp\n if word1[i - 1] != word2[j - 1]:\n replace += 1\n temp = dp[j]\n dp[j] = min(addition, deletion, replace)\n\n return dp[l2]","language":"python"}],"anki":"This problem is solved by dynamic programming. Consider two words, `w1` with length `l1` and `w2` with length `l2`. We use a matrix of size `(l1 + 1) * (l2 + 1)`, with each cell `dp[i][j]` representing the minimum number of operations to transform the first `i` letters of `w1` to first `j` letters of `w2`. We offset the number of rows and columns by 1 to represent the empty string.\n\nNotice that when iterating through each row of the matrix, we are only using the cells in the row above and one cell before. So it is possible to optimize the space usage to only an 1-D array of size `min(l1, l2)`, since the count of operations from is symmetric for `w1` and `w2`.","Link":"https://leetcode.com/problems/edit-distance/","Solved":"- [x] solved\n- [ ] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [x] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.\r\n\r\nYou have the following 3 operations permitted on a word:\r\n\r\n\r\n\tInsert a character\r\n\tDelete a character\r\n\tReplace a character\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: word1 = \"horse\", word2 = \"ros\"\r\nOutput: 3\r\nExplanation: \r\nhorse -> rorse (replace 'h' with 'r')\r\nrorse -> rose (remove 'r')\r\nrose -> ros (remove 'e')\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: word1 = \"intention\", word2 = \"execution\"\r\nOutput: 5\r\nExplanation: \r\nintention -> inention (remove 't')\r\ninention -> enention (replace 'i' with 'e')\r\nenention -> exention (replace 'n' with 'x')\r\nexention -> exection (replace 'n' with 'c')\r\nexection -> execution (insert 'u')\r\n\r\n"},{"index":34,"title":"Find First and Last Position of Element in Sorted Array","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.\r\n\r\nYour algorithm's runtime complexity must be in the order of O(log n).\r\n\r\nIf the target is not found in the array, return [-1, -1].\r\n\r\nExample 1:\r\n\r\n\r\nInput: nums = [5,7,7,8,8,10], target = 8\r\nOutput: [3,4]\r\n\r\nExample 2:\r\n\r\n\r\nInput: nums = [5,7,7,8,8,10], target = 6\r\nOutput: [-1,-1]\r\n"},{"index":128,"title":"Longest Consecutive Sequence","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N)$","code":"class Solution:\n def longestConsecutive(self, nums: List[int]) -> int:\n s = set(nums)\n longest = 0\n for n in s:\n if n - 1 not in s:\n cur = n\n cur_len = 1\n while cur + 1 in s:\n cur += 1\n cur_len += 1\n longest = max(cur_len, longest)\n return longest","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/longest-consecutive-sequence/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem"},"desc":"Given an unsorted array of integers, find the length of the longest consecutive elements sequence.\r\n\r\nYour algorithm should run in O(n) complexity.\r\n\r\nExample:\r\n\r\n\r\nInput: [100, 4, 200, 1, 3, 2]\r\nOutput: 4\r\nExplanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.\r\n\r\n"},{"index":1048,"title":"Longest String Chain","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a list of words, each word consists of English lowercase letters.\r\n\r\nLet's say word1 is a predecessor of word2 if and only if we can add exactly one letter anywhere in word1 to make it equal to word2.  For example, \"abc\" is a predecessor of \"abac\".\r\n\r\nA word chain is a sequence of words [word_1, word_2, ..., word_k] with k >= 1, where word_1 is a predecessor of word_2, word_2 is a predecessor of word_3, and so on.\r\n\r\nReturn the longest possible length of a word chain with words chosen from the given list of words.\r\n\r\n \r\n\r\nExample 1:\r\n\r\n\r\nInput: [\"a\",\"b\",\"ba\",\"bca\",\"bda\",\"bdca\"]\r\nOutput: 4\r\nExplanation: one of the longest word chain is \"a\",\"ba\",\"bda\",\"bdca\".\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\t1 <= words.length <= 1000\r\n\t1 <= words[i].length <= 16\r\n\twords[i] only consists of English lowercase letters.\r\n\r\n\r\n\r\n \r\n"},{"index":215,"title":"Kth Largest Element in an Array","body":{"mySolution":[{"time":"$O(kN)$","space":"$O(k)$","code":"class Solution:\n def findKthLargest(self, nums: List[int], k: int) -> int:\n k_max = [float('-inf')] * k\n for n in nums:\n if n > k_max[0]:\n k_max[0] = n\n for i in range(1, k):\n if n > k_max[i]:\n k_max[i], k_max[i - 1] = k_max[i - 1], k_max[i]\n else:\n break\n return k_max[0]\n ","language":""}],"optimizedSolution":[{"time":"$O(N)$","space":"$O(N^2)$","code":"Post the optimized solution after looking at the solution. ","language":""}],"anki":"","Link":"https://leetcode.com/problems/kth-largest-element-in-an-array/","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [ ] not-intuitive\n- [ ] bad-problem"},"desc":"Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.\r\n\r\nExample 1:\r\n\r\n\r\nInput: [3,2,1,5,6,4] and k = 2\r\nOutput: 5\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [3,2,3,1,2,4,5,5,6] and k = 4\r\nOutput: 4\r\n\r\nNote: \r\nYou may assume k is always valid, 1 ≤ k ≤ array's length.\r\n"},{"index":45,"title":"Jump Game II","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given an array of non-negative integers, you are initially positioned at the first index of the array.\r\n\r\nEach element in the array represents your maximum jump length at that position.\r\n\r\nYour goal is to reach the last index in the minimum number of jumps.\r\n\r\nExample:\r\n\r\n\r\nInput: [2,3,1,1,4]\r\nOutput: 2\r\nExplanation: The minimum number of jumps to reach the last index is 2.\r\n Jump 1 step from index 0 to 1, then 3 steps to the last index.\r\n\r\nNote:\r\n\r\nYou can assume that you can always reach the last index.\r\n"},{"index":1186,"title":"Maximum Subarray Sum with One Deletion","body":{"mySolution":[],"optimizedSolution":[{"time":"$O(N)$","space":"$O(1)$","code":"# Using Kadane's algorithm\nclass Solution:\n def maximumSum(self, arr: List[int]) -> int:\n gmax = max_ele = arr[0]\n not_ignored = ignored = 0\n for a in arr:\n # not_ignored is the max subarray-sum without ignoring elements\n not_ignored = max(a, not_ignored + a)\n # ignored is the max subarray-sum that must has one element ignored\n # two choices: 1. ignore the current one 2.include the current one\n ignored = max(ignored + a, not_ignored - a)\n # global max is obtained by either ignoring element or not\n gmax = max(gmax, ignored, not_ignored)\n # at the mean time, we pick the max element\n max_ele = max(max_ele, a)\n # If all elements are < 0, since our subarray cannot be empty, our gmax will give 0\n # If there is one positive element, gmax will try including it\n # So we return the maximum element if all are negative\n return max_ele if max_ele < 0 else gmax","language":"python"}],"anki":"","Link":"https://leetcode.com/problems/maximum-subarray-sum-with-one-deletion/","Related":"","Solved":"- [ ] solved\n- [x] by-discussion\n- [ ] no-idea\n- [ ] later","Status":"- [ ] fully-master\n- [ ] can-optimize\n- [x] not-intuitive\n- [ ] bad-problem","Test Cases":""},"desc":""},{"index":1072,"title":"Flip Columns For Maximum Number of Equal Rows","body":{"mySolution":[],"optimizedSolution":[],"anki":""},"desc":"Given a matrix consisting of 0s and 1s, we may choose any number of columns in the matrix and flip every cell in that column.  Flipping a cell changes the value of that cell from 0 to 1 or from 1 to 0.\r\n\r\nReturn the maximum number of rows that have all values equal after some number of flips.\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\nExample 1:\r\n\r\n\r\nInput: [[0,1],[1,1]]\r\nOutput: 1\r\nExplanation: After flipping no values, 1 row has all values equal.\r\n\r\n\r\n\r\nExample 2:\r\n\r\n\r\nInput: [[0,1],[1,0]]\r\nOutput: 2\r\nExplanation: After flipping values in the first column, both rows have equal values.\r\n\r\n\r\n\r\nExample 3:\r\n\r\n\r\nInput: [[0,0,0],[0,0,1],[1,1,0]]\r\nOutput: 2\r\nExplanation: After flipping values in the first two columns, the last two rows have equal values.\r\n\r\n\r\n \r\n\r\nNote:\r\n\r\n\r\n\t1 <= matrix.length <= 300\r\n\t1 <= matrix[i].length <= 300\r\n\tAll matrix[i].length's are equal\r\n\tmatrix[i][j] is 0 or 1\r\n\r\n\r\n\r\n"},{}]} \ No newline at end of file diff --git a/lib/ankiGenerator.js b/lib/ankiGenerator.js new file mode 100644 index 00000000..da76a871 --- /dev/null +++ b/lib/ankiGenerator.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const noteJsonPath = '/Users/elvischen/leetcode-cli/lcNotes.json'; +if (!fs.existsSync(noteJsonPath)) { + console.error('Notes json not exist'); + process.exit(1); +} +const noteJson = fs.readFileSync(noteJsonPath, { encoding: 'utf8', flag: 'r' }); +const notes = JSON.parse(noteJson); +const problems = notes.problems; +let result = ''; +function escapeForHtml(desc) { + const problemLines = desc + .replace(/\r/g, '') + .replace(/\t/g, '  ') + .replace(/`([^`]+)`/g, '$1') + .replace(/\$([^$]+)\$/g, '\\($1\\)') + .split('\n'); + let i = 0; + while (i < problemLines.length) { + if (problemLines[i].length === 0 && + i + 1 < problemLines.length && + problemLines[i + 1].length === 0) { + problemLines.splice(i + 1, 1); + continue; + } + i++; + } + return problemLines.map(val => `
${val}
`).join(''); +} +for (const problem of problems) { + const { body, index, title, desc } = problem; + if (!index || !body) { + continue; + } + const { anki } = body; + if (!anki) { + continue; + } + result += `${index} \t
${index}. ${title}
${escapeForHtml(desc)} \t ${escapeForHtml(anki)}`; + result += '\n'; +} +const outputName = 'ankiCards.txt'; +const outputFullPath = process.cwd() + '/' + outputName; +if (fs.existsSync(outputFullPath)) { + fs.unlinkSync(outputFullPath); +} +fs.writeFileSync(outputFullPath, result); +//# sourceMappingURL=ankiGenerator.js.map \ No newline at end of file diff --git a/lib/ankiGenerator.js.map b/lib/ankiGenerator.js.map new file mode 100644 index 00000000..5cfc6a2c --- /dev/null +++ b/lib/ankiGenerator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ankiGenerator.js","sourceRoot":"","sources":["ankiGenerator.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AAEzB,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAElE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;IAChC,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB;AAED,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AAChF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAmB,KAAK,CAAC,QAAQ,CAAC;AAChD,IAAI,MAAM,GAAG,EAAE,CAAC;AAEhB,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,YAAY,GAAG,IAAI;SACtB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC;SAC9B,OAAO,CAAC,YAAY,EAAE,iBAAiB,CAAC;SACxC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC;SACnC,KAAK,CAAC,IAAI,CAAC,CAAC;IACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE;QAC9B,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;YAC5B,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM;YAC3B,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAC9B,SAAS;SACZ;QACD,CAAC,EAAE,CAAC;KACL;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC;AAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;IAC9B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAC7C,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE;QACnB,SAAS;KACV;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE;QACT,SAAS;KACV;IACD,MAAM,IAAI,GAAG,KAAK,YAAY,KAAK,KAAK,KAAK,SAAS,aAAa,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;IACtG,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,UAAU,CAAC;AACxD,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;IACjC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;CAC/B;AACD,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/ankiGenerator.ts b/lib/ankiGenerator.ts new file mode 100644 index 00000000..b2eed790 --- /dev/null +++ b/lib/ankiGenerator.ts @@ -0,0 +1,53 @@ +import * as fs from 'fs'; + +const noteJsonPath = '/Users/elvischen/leetcode-cli/lcNotes.json'; + +if (!fs.existsSync(noteJsonPath)) { + console.error('Notes json not exist'); + process.exit(1); +} + +const noteJson = fs.readFileSync(noteJsonPath, { encoding: 'utf8', flag: 'r' }); +const notes = JSON.parse(noteJson); +const problems : NoteContent[] = notes.problems; +let result = ''; + +function escapeForHtml(desc: string) : string { + const problemLines = desc + .replace(/\r/g, '') + .replace(/\t/g, '  ') + .replace(/`([^`]+)`/g, '$1') + .replace(/\$([^$]+)\$/g, '\\($1\\)') + .split('\n'); + let i = 0; + while (i < problemLines.length) { + if (problemLines[i].length === 0 && + i + 1 < problemLines.length && + problemLines[i + 1].length === 0) { + problemLines.splice(i + 1, 1); + continue; + } + i++; + } + return problemLines.map(val => `
${val}
`).join(''); +} + +for (const problem of problems) { + const { body, index, title, desc } = problem; + if (!index || !body) { + continue; + } + const { anki } = body; + if (!anki) { + continue; + } + result += `${index} \t
${index}. ${title}
${escapeForHtml(desc)} \t ${escapeForHtml(anki)}`; + result += '\n'; +} + +const outputName = 'ankiCards.txt'; +const outputFullPath = process.cwd() + '/' + outputName; +if (fs.existsSync(outputFullPath)) { + fs.unlinkSync(outputFullPath); +} +fs.writeFileSync(outputFullPath, result); \ No newline at end of file diff --git a/lib/cli.js b/lib/cli.js index e59cf7f5..96ad7e51 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -71,7 +71,7 @@ function initPlugins(cb) { } } -var cli = {}; +var cli = { initPlugins }; function runCommand() { var yargs = require('yargs'); @@ -104,4 +104,22 @@ cli.run = function() { }); }; +cli.runNext = function(cb) { + process.stdout.on('error', function(e) { + if (e.code === 'EPIPE') process.exit(); + }); + + config.init(); + + initColor(); + initIcon(); + initLogLevel(); + initDir() + initPlugins(function(e) { + if (e) return log.fatal(e); + cache.init(); + cb(); + }); +} + module.exports = cli; diff --git a/lib/exporter.js b/lib/exporter.js new file mode 100644 index 00000000..a8fb97cd --- /dev/null +++ b/lib/exporter.js @@ -0,0 +1,131 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const cliCore = require('./core'); +const cli = require('./cli'); +const quiverNoteBookDir = '/Users/elvischen/Documents/Sync/Quiver.qvlibrary/1FC2DD42-ED1D-4AB4-B15E-34BE6FB377F0.qvnotebook/'; +const noteDirs = fs.readdirSync(quiverNoteBookDir); +cli.runNext(main); +function main() { + const promiseArr = noteDirs.map(noteDir => { + const fullNotePath = quiverNoteBookDir + noteDir; + const noteMetaPath = fullNotePath + '/' + 'meta.json'; + const noteContentPath = fullNotePath + '/' + 'content.json'; + if (!fs.existsSync(noteContentPath)) { + return Promise.resolve({}); + } + return parseNoteContent(noteContentPath); + }); + Promise.all(promiseArr).then(problems => { + const output = { problems }; + const outputName = 'lcNotes.json'; + const fullOutputName = process.cwd() + '/' + outputName; + if (fs.existsSync(fullOutputName)) { + fs.unlinkSync(fullOutputName); + } + fs.writeFileSync(fullOutputName, JSON.stringify(output)); + }); +} +function storeBody(match, content, parsedBody) { + if (/anki/i.test(match)) { + // Anki solution + parsedBody['anki'] = content; + return; + } + if (/Optimized/.test(match)) { + // Optimized solution + parsedBody.optimizedSolution.push(parseSolution(content)); + return; + } + if (/solution/i.test(match)) { + // My solution + parsedBody.mySolution.push(parseSolution(content)); + return; + } + parsedBody[match] = content; +} +function parseSolution(content) { + const timeMatch = content.match(/\*Time\*:/); + const spaceMatch = content.match(/\*Space\*:/); + const codeEnvMatch = content.match(/```/); + const untilFirstWrap = (index, str) => { + const firstInd = str.indexOf('\n', index); + if (firstInd === -1) { + return ''; + } + return str.substring(index, firstInd).trim(); + }; + let time = '', space = '', code = '', language = ''; + if (timeMatch) { + time = untilFirstWrap(timeMatch.index + timeMatch[0].length, content); + } + if (spaceMatch) { + space = untilFirstWrap(spaceMatch.index + spaceMatch[0].length, content); + } + if (codeEnvMatch) { + language = untilFirstWrap(codeEnvMatch.index + codeEnvMatch[0].length, content); + const allCode = content.slice(codeEnvMatch.index).split('\n'); + // Remove first row + allCode.shift(); + let i = allCode.length - 1; + // Remove last row + while (allCode[i].length === 0 || !allCode[i].startsWith("```")) { + i--; + allCode.pop(); + } + allCode.pop(); + code = allCode.join('\n'); + } + const solution = { time, space, code, language }; + return solution; +} +function parseNoteContent(noteContentPath) { + const contentJson = fs.readFileSync(noteContentPath, { + encoding: 'utf8', + flag: 'r' + }); + const { title, cells } = JSON.parse(contentJson); + // Default parsing the first cell + let body = cells[0].data; + const parsedBody = { + mySolution: [], + optimizedSolution: [], + anki: '' + }; + // Parse body into sections + let curMatch = body.match(/\*\*(.+)\*\*:/); + while (curMatch) { + const { 0: exact, 1: match, index } = curMatch; + body = body.slice(index + exact.length); + const nextMatch = body.match(/\*\*(.+)\*\*:/); + if (nextMatch) { + const { index: nextIndex } = nextMatch; + storeBody(match, body.substring(0, nextIndex).trim(), parsedBody); + } + else { + // Last match + storeBody(match, body, parsedBody); + } + curMatch = nextMatch; + } + const titleArr = title.split('.'); + const index = parseInt(titleArr[0], 10); + return new Promise((res, rej) => { + cliCore.getProblem(index, (e, problem) => { + const result = { + index, + title: titleArr[1].trim(), + body: parsedBody, + desc: '' + }; + if (e) { + console.log(title); + console.error(`Problem ${index} not found!`); + res(result); + } + result.desc = problem.desc; + res(result); + }); + }); +} +//# sourceMappingURL=exporter.js.map \ No newline at end of file diff --git a/lib/exporter.js.map b/lib/exporter.js.map new file mode 100644 index 00000000..912a858a --- /dev/null +++ b/lib/exporter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exporter.js","sourceRoot":"","sources":["exporter.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AAEzB,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAClC,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7B,MAAM,iBAAiB,GACrB,mGAAmG,CAAC;AAEtG,MAAM,QAAQ,GAAa,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAE7D,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAElB,SAAS,IAAI;IACX,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QACxC,MAAM,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC;QACjD,MAAM,YAAY,GAAG,YAAY,GAAG,GAAG,GAAG,WAAW,CAAC;QACtD,MAAM,eAAe,GAAG,YAAY,GAAG,GAAG,GAAG,cAAc,CAAC;QAC5D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;YACnC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC5B;QACD,OAAO,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QACtC,MAAM,MAAM,GAAG,EAAE,QAAQ,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,cAAc,CAAC;QAClC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,UAAU,CAAC;QACxD,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YACjC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;SAC/B;QACD,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,OAAe,EAAE,UAAoB;IACrE,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QACvB,gBAAgB;QAChB,UAAU,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAC7B,OAAO;KACR;IACD,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC3B,qBAAqB;QACrB,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1D,OAAO;KACR;IACD,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC3B,cAAc;QACd,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QACnD,OAAO;KACR;IACD,UAAU,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;AAC9B,CAAC;AAED,SAAS,aAAa,CAAC,OAAe;IACpC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,EAAE;QACpD,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QACD,OAAO,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC,CAAC;IACF,IAAI,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,CAAC;IACpD,IAAI,SAAS,EAAE;QACb,IAAI,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvE;IACD,IAAI,UAAU,EAAE;QACd,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1E;IACD,IAAI,YAAY,EAAE;QAChB,QAAQ,GAAG,cAAc,CAAC,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChF,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9D,mBAAmB;QACnB,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,kBAAkB;QAClB,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YAC/D,CAAC,EAAE,CAAC;YACJ,OAAO,CAAC,GAAG,EAAE,CAAC;SACf;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3B;IACD,MAAM,QAAQ,GAAc,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC5D,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CAAC,eAAuB;IAC/C,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE;QACnD,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,GAAG;KACV,CAAC,CAAC;IACH,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAClB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5B,iCAAiC;IACjC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzB,MAAM,UAAU,GAAc;QAC5B,UAAU,EAAE,EAAE;QACd,iBAAiB,EAAE,EAAE;QACrB,IAAI,EAAE,EAAE;KACT,CAAC;IACF,2BAA2B;IAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3C,OAAO,QAAQ,EAAE;QACf,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;QAC/C,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC9C,IAAI,SAAS,EAAE;YACb,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;YACvC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;SACnE;aAAM;YACL,aAAa;YACb,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;SACpC;QACD,QAAQ,GAAG,SAAS,CAAC;KACtB;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAExC,OAAO,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC9B,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAgB,EAAE,EAAE;YAChD,MAAM,MAAM,GAAiB;gBAC3B,KAAK;gBACL,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;gBACzB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,EAAE;aACT,CAAC;YACF,IAAI,CAAC,EAAE;gBACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACnB,OAAO,CAAC,KAAK,CAAC,WAAW,KAAK,aAAa,CAAC,CAAC;gBAC7C,GAAG,CAAC,MAAM,CAAC,CAAC;aACb;YACD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC3B,GAAG,CAAC,MAAM,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/lib/exporter.ts b/lib/exporter.ts new file mode 100644 index 00000000..e0d1221c --- /dev/null +++ b/lib/exporter.ts @@ -0,0 +1,139 @@ +import * as fs from 'fs'; + +const cliCore = require('./core'); +const cli = require('./cli'); + +const quiverNoteBookDir: string = + '/Users/elvischen/Documents/Sync/Quiver.qvlibrary/1FC2DD42-ED1D-4AB4-B15E-34BE6FB377F0.qvnotebook/'; + +const noteDirs: string[] = fs.readdirSync(quiverNoteBookDir); + +cli.runNext(main); + +function main() { + const promiseArr = noteDirs.map(noteDir => { + const fullNotePath = quiverNoteBookDir + noteDir; + const noteMetaPath = fullNotePath + '/' + 'meta.json'; + const noteContentPath = fullNotePath + '/' + 'content.json'; + if (!fs.existsSync(noteContentPath)) { + return Promise.resolve({}); + } + return parseNoteContent(noteContentPath); + }); + + Promise.all(promiseArr).then(problems => { + const output = { problems }; + const outputName = 'lcNotes.json'; + const fullOutputName = process.cwd() + '/' + outputName; + if (fs.existsSync(fullOutputName)) { + fs.unlinkSync(fullOutputName); + } + fs.writeFileSync(fullOutputName, JSON.stringify(output)); + }); +} + +function storeBody(match: string, content: string, parsedBody: NoteBody) { + if (/anki/i.test(match)) { + // Anki solution + parsedBody['anki'] = content; + return; + } + if (/Optimized/.test(match)) { + // Optimized solution + parsedBody.optimizedSolution.push(parseSolution(content)); + return; + } + if (/solution/i.test(match)) { + // My solution + parsedBody.mySolution.push(parseSolution(content)); + return; + } + parsedBody[match] = content; +} + +function parseSolution(content: string) : Solution { + const timeMatch = content.match(/\*Time\*:/); + const spaceMatch = content.match(/\*Space\*:/); + const codeEnvMatch = content.match(/```/); + const untilFirstWrap = (index: number, str: string) => { + const firstInd = str.indexOf('\n', index); + if (firstInd === -1) { + return ''; + } + return str.substring(index, firstInd).trim(); + }; + let time = '', space = '', code = '', language = ''; + if (timeMatch) { + time = untilFirstWrap(timeMatch.index + timeMatch[0].length, content); + } + if (spaceMatch) { + space = untilFirstWrap(spaceMatch.index + spaceMatch[0].length, content); + } + if (codeEnvMatch) { + language = untilFirstWrap(codeEnvMatch.index + codeEnvMatch[0].length, content); + const allCode = content.slice(codeEnvMatch.index).split('\n'); + // Remove first row + allCode.shift(); + let i = allCode.length - 1; + // Remove last row + while (allCode[i].length === 0 || !allCode[i].startsWith("```")) { + i--; + allCode.pop(); + } + allCode.pop(); + code = allCode.join('\n'); + } + const solution : Solution = { time, space, code, language }; + return solution; +} + +function parseNoteContent(noteContentPath: string) : Promise { + const contentJson = fs.readFileSync(noteContentPath, { + encoding: 'utf8', + flag: 'r' + }); + const { title, cells } : { title: string, cells: Cell[] } + = JSON.parse(contentJson); + // Default parsing the first cell + let body = cells[0].data; + const parsedBody : NoteBody = { + mySolution: [], + optimizedSolution: [], + anki: '' + }; + // Parse body into sections + let curMatch = body.match(/\*\*(.+)\*\*:/); + while (curMatch) { + const { 0: exact, 1: match, index } = curMatch; + body = body.slice(index + exact.length); + const nextMatch = body.match(/\*\*(.+)\*\*:/); + if (nextMatch) { + const { index: nextIndex } = nextMatch; + storeBody(match, body.substring(0, nextIndex).trim(), parsedBody); + } else { + // Last match + storeBody(match, body, parsedBody); + } + curMatch = nextMatch; + } + const titleArr = title.split('.'); + const index = parseInt(titleArr[0], 10); + + return new Promise((res, rej) => { + cliCore.getProblem(index, (e, problem: Problem) => { + const result : NoteContent = { + index, + title: titleArr[1].trim(), + body: parsedBody, + desc: '' + }; + if (e) { + console.log(title); + console.error(`Problem ${index} not found!`); + res(result); + } + result.desc = problem.desc; + res(result); + }); + }); +} diff --git a/lib/global.d.ts b/lib/global.d.ts new file mode 100644 index 00000000..dc2d7cf1 --- /dev/null +++ b/lib/global.d.ts @@ -0,0 +1,28 @@ +interface NoteContent { + index: number + title: string + desc: string + body: NoteBody +} + +interface Problem { + desc: string +} + +interface NoteBody { + mySolution: Solution[] + optimizedSolution: Solution[], + anki: string +} + +interface Solution { + time: string + space: string + language: string + code: string +} + +interface Cell { + type: string + data: string +} \ No newline at end of file diff --git a/package.json b/package.json index ee8f2414..5cd005f4 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ }, "homepage": "https://github.com/skygragon/leetcode-cli#readme", "dependencies": { + "@types/node": "^12.7.5", "ansi-styles": "3.2.1", "cheerio": "0.20.0", "he": "1.2.0", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..31a02f16 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "target": "es2015", + "module": "commonjs", + "sourceMap": true + }, + "include": ["lib/**/*"], + "exclude": [] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..675e890f --- /dev/null +++ b/yarn.lock @@ -0,0 +1,3954 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" + integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== + dependencies: + "@babel/types" "^7.6.0" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + +"@babel/highlight@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.4.3", "@babel/parser@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" + integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== + +"@babel/parser@~7.4.4": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872" + integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew== + +"@babel/runtime@~7.4.4": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12" + integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ== + dependencies: + regenerator-runtime "^0.13.2" + +"@babel/template@^7.1.0", "@babel/template@^7.4.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/traverse@^7.4.3": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" + integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.6.0": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" + integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*", "@types/node@^12.7.5": + version "12.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f" + integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w== + +abab@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= + +acorn-globals@^1.0.4: + version "1.0.9" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" + integrity sha1-VbtemGkVB7dFedBRNBMhfDgMVM8= + dependencies: + acorn "^2.1.0" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= + dependencies: + acorn "^3.0.4" + +acorn-jsx@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f" + integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw== + +acorn@^2.1.0, acorn@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" + integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc= + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= + +acorn@^5.5.0: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +acorn@^6.0.2: + version "6.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" + integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== + +ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + integrity sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I= + +ajv@^5.2.3, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.10.2, ajv@^6.5.3, ajv@^6.5.5: + version "6.10.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" + integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@3.2.1, ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== + dependencies: + default-require-extensions "^2.0.0" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-union@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +async@~0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= + +async@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" + integrity sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + +babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +byline@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +caching-transform@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-2.0.0.tgz#e1292bd92d35b6e8b1ed7075726724b3bd64eea0" + integrity sha512-tTfemGmFWe7KZ3KN6VsSgQZbd9Bgo7A40wlp4PTsJJvFu4YAnEC5YnfdiKq6Vh2i9XJLnA9n8OXD46orVpnPMw== + dependencies: + make-dir "^1.0.0" + md5-hex "^2.0.0" + package-hash "^2.0.0" + write-file-atomic "^2.0.0" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chai@4.2.0, chai@^4.1.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.0" + type-detect "^4.0.5" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2, chalk@~2.4.1, chalk@~2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +cheerio@0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.20.0.tgz#5c710f2bab95653272842ba01c6ea61b3545ec35" + integrity sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "~3.8.1" + lodash "^4.1.0" + optionalDependencies: + jsdom "^7.0.2" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-spinners@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" + integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +cliui@^3.0.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +colors@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= + +colors@^1.1.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" + integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== + +commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +convert-source-map@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +"cssstyle@>= 0.2.29 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= + dependencies: + cssom "0.3.x" + +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI= + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug-log@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" + integrity sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8= + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.1, debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.0.tgz#3103cdf8ab6d32cf4a8df7865458f2b8d33f3745" + integrity sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-equal@~0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.2.2.tgz#84b745896f34c684e98f2ce0e42abaf43bba017d" + integrity sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0= + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= + dependencies: + strip-bom "^3.0.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +dir-glob@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== + dependencies: + path-type "^3.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +dom-serializer@0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.1.tgz#13650c850daffea35d8b626a4cfc4d3a17643fdb" + integrity sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +domelementtype@1, domelementtype@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" + integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + integrity sha1-LeWaCCLVAn+r/28DLCsloqir5zg= + dependencies: + domelementtype "1" + +domutils@1.5, domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + dependencies: + once "^1.4.0" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + integrity sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY= + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" + integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es6-error@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" + integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.6.1: + version "1.12.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541" + integrity sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +escodegen@~1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" + integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-config-google@0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.11.0.tgz#fd0fc70be2e9114df097cac93a9b5b0d4e1c6830" + integrity sha512-z541Fs5TFaY7/35v/z100InQ2f3V2J7e3u/0yKrnImgsHjh6JWgSRngfC/mZepn/+XN16jUydt64k//kxXc1fw== + +eslint-scope@^3.7.1: + version "3.7.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" + integrity sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" + +eslint-visitor-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.9.0.tgz#b234b6d15ef84b5849c6de2af43195a2d59d408e" + integrity sha512-g4KWpPdqN0nth+goDNICNXGfJF7nNnepthp46CAlJoJtC5K/cLu3NgCM3AHu1CkJ5Hzt9V0Y0PBAO6Ay/gGb+w== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^2.1.0" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + imurmurhash "^0.1.4" + inquirer "^6.1.0" + is-resolvable "^1.1.0" + js-yaml "^3.12.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.5" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^2.0.1" + require-uncached "^1.0.3" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.0.2" + text-table "^0.2.0" + +eslint@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" + integrity sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ== + dependencies: + ajv "^5.3.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.1.0" + doctrine "^2.1.0" + eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" + esquery "^1.0.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.0.1" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^1.0.1" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "4.0.2" + text-table "~0.2.0" + +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" + +espree@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f" + integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w== + dependencies: + acorn "^6.0.2" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.0, esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-template@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= + +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-glob@^2.2.6: + version "2.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +flat-cache@^1.2.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" + integrity sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg== + dependencies: + circular-json "^0.3.1" + graceful-fs "^4.1.2" + rimraf "~2.6.2" + write "^0.2.1" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +foreground-child@^1.5.6: + version "1.5.6" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" + integrity sha1-T9ca0t/elnibmApcCilZN8svXOk= + dependencies: + cross-spawn "^4" + signal-exit "^3.0.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +from2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.2, glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.0.1, globals@^11.1.0, globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@~9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" + integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.2" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.2" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" + integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.1.2: + version "4.2.1" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.1.tgz#dc69c0e61604224f0c23b38b5b6741db210b57da" + integrity sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hosted-git-info@^2.1.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" + integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== + +htmlparser2@~3.8.1: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + integrity sha1-mWwosZFRaovoZQGn15dX5ccMEGg= + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +i@0.3.x: + version "0.3.6" + resolved "https://registry.yarnpkg.com/i/-/i-0.3.6.tgz#d96c92732076f072711b6b10fd7d4f65ad8ee23d" + integrity sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0= + +iconv-lite@^0.4.17, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^3.3.3: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + +ignore@^4.0.3, ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +inquirer@^6.1.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +into-stream@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-5.1.0.tgz#b05f37d8fed05c06a0b43b556d74e53e5af23878" + integrity sha512-cbDhb8qlxKMxPBk/QxTtYg1DQ4CwXmadu7quG3B7nrJsgSncEreF2kwWKZFdnjc/lSNNIkFPsjI7SM0Cx/QXPw== + dependencies: + from2 "^2.3.0" + p-is-promise "^2.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= + dependencies: + has "^1.0.1" + +is-resolvable@^1.0.0, is-resolvable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@0.1.x, isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +istanbul-lib-coverage@^2.0.1, istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" + integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== + +istanbul-lib-hook@^2.0.1: + version "2.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" + integrity sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA== + dependencies: + append-transform "^1.0.0" + +istanbul-lib-instrument@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" + integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== + dependencies: + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" + +istanbul-lib-report@^2.0.2: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" + integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== + dependencies: + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" + +istanbul-lib-source-maps@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz#ce8b45131d8293fdeaa732f4faf1852d13d0a97e" + integrity sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A== + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^2.0.1" + make-dir "^1.3.0" + rimraf "^2.6.2" + source-map "^0.6.1" + +istanbul-reports@^2.0.1: + version "2.2.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" + integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== + dependencies: + handlebars "^4.1.2" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.12.0, js-yaml@^3.9.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^7.0.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-7.2.2.tgz#40b402770c2bda23469096bee91ab675e3b1fc6e" + integrity sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4= + dependencies: + abab "^1.0.0" + acorn "^2.4.0" + acorn-globals "^1.0.4" + cssom ">= 0.3.0 < 0.4.0" + cssstyle ">= 0.2.29 < 0.3.0" + escodegen "^1.6.1" + nwmatcher ">= 1.3.7 < 2.0.0" + parse5 "^1.5.1" + request "^2.55.0" + sax "^1.1.4" + symbol-tree ">= 3.1.0 < 4.0.0" + tough-cookie "^2.2.0" + webidl-conversions "^2.0.0" + whatwg-url-compat "~0.6.5" + xml-name-validator ">= 2.0.1 < 3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + +lodash@^4.1.0, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0, make-dir@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5-hex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-2.0.0.tgz#d0588e9f1c74954492ecd24ac0ac6ce997d92e33" + integrity sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM= + dependencies: + md5-o-matic "^0.1.1" + +md5-o-matic@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" + integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M= + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +merge-source-map@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" + integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== + dependencies: + source-map "^0.6.1" + +merge2@^1.2.3: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" + integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + dependencies: + mime-db "1.40.0" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= + +minimist@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@0.5.1, mkdirp@0.x.x, mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +mocha@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== + dependencies: + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "5.4.0" + +moment@^2.20.1: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +multistream@~2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-2.1.1.tgz#629d3a29bd76623489980d04519a2c365948148c" + integrity sha512-xasv76hl6nr1dEy3lPvy7Ej7K/Lx3O/FCvwge8PeVJpciPPoNCbaANcNiBug3IpdvTveZUcAV0DJzdnUDMesNQ== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.5" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +nconf@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/nconf/-/nconf-0.10.0.tgz#da1285ee95d0a922ca6cee75adcf861f48205ad2" + integrity sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q== + dependencies: + async "^1.4.0" + ini "^1.3.0" + secure-keys "^1.0.0" + yargs "^3.19.0" + +ncp@1.0.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-1.0.1.tgz#d15367e5cb87432ba117d2bf80fdf45aecfb4246" + integrity sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY= + +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +nock@10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/nock/-/nock-10.0.2.tgz#9e9a92253808e480a8163c2a21fc12937c02c3b0" + integrity sha512-uWrdlRzG28SXM5yqYsUHfYBRqljF8P6aTRDh6Y5kTgs/Q4GB59QWlpiegmDHQouvmX/rDyKkC/nk+k4nA+QPNw== + dependencies: + chai "^4.1.2" + debug "^4.1.0" + deep-equal "^1.0.0" + json-stringify-safe "^5.0.1" + lodash "^4.17.5" + mkdirp "^0.5.0" + propagate "^1.0.0" + qs "^6.5.1" + semver "^5.5.0" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +"nwmatcher@>= 1.3.7 < 2.0.0": + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" + integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== + +nyc@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-13.1.0.tgz#463665c7ff6b5798e322624a5eb449a678db90e3" + integrity sha512-3GyY6TpQ58z9Frpv4GMExE1SV2tAgYqC7HSy2omEhNiCT3mhT9NyiOvIE8zkbuJVFzmvvNTnE4h/7/wQae7xLg== + dependencies: + archy "^1.0.0" + arrify "^1.0.1" + caching-transform "^2.0.0" + convert-source-map "^1.6.0" + debug-log "^1.0.1" + find-cache-dir "^2.0.0" + find-up "^3.0.0" + foreground-child "^1.5.6" + glob "^7.1.3" + istanbul-lib-coverage "^2.0.1" + istanbul-lib-hook "^2.0.1" + istanbul-lib-instrument "^3.0.0" + istanbul-lib-report "^2.0.2" + istanbul-lib-source-maps "^2.0.1" + istanbul-reports "^2.0.1" + make-dir "^1.3.0" + merge-source-map "^1.1.0" + resolve-from "^4.0.0" + rimraf "^2.6.2" + signal-exit "^3.0.2" + spawn-wrap "^1.4.2" + test-exclude "^5.0.0" + uuid "^3.3.2" + yargs "11.1.0" + yargs-parser "^9.0.2" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-is@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY= + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +ora@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-3.0.0.tgz#8179e3525b9aafd99242d63cc206fd64732741d0" + integrity sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg== + dependencies: + chalk "^2.3.1" + cli-cursor "^2.1.0" + cli-spinners "^1.1.0" + log-symbols "^2.2.0" + strip-ansi "^4.0.0" + wcwidth "^1.0.1" + +os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-locale@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" + integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +package-hash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-2.0.0.tgz#78ae326c89e05a4d813b68601977af05c00d2a0d" + integrity sha1-eK4ybIngWk2BO2hgGXevBcANKg0= + dependencies: + graceful-fs "^4.1.11" + lodash.flattendeep "^4.4.0" + md5-hex "^2.0.0" + release-zalgo "^1.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.5, path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +pathval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-fetch@~2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-2.6.2.tgz#bad65a1f77f3bbd371be332a8da05a1d0c7edc7c" + integrity sha512-7DN6YYP1Kct02mSkhfblK0HkunJ7BJjGBkSkFdIW/QKIovtAMaICidS7feX+mHfnZ98OP7xFJvBluVURlrHJxA== + dependencies: + "@babel/runtime" "~7.4.4" + byline "~5.0.0" + chalk "~2.4.1" + expand-template "~2.0.3" + fs-extra "~7.0.1" + minimist "~1.2.0" + progress "~2.0.0" + request "~2.88.0" + request-progress "~3.0.0" + semver "~6.0.0" + unique-temp-dir "~1.0.0" + +pkg@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-4.4.0.tgz#9b6f2c77f891b6eb403681f5a8c1d2de09a976d3" + integrity sha512-bFNJ3v56QwqB6JtAl/YrczlmEKBPBVJ3n5nW905kgvG1ex9DajODpTs0kLAFxyLwoubDQux/RPJFL6WrnD/vpg== + dependencies: + "@babel/parser" "~7.4.4" + "@babel/runtime" "~7.4.4" + chalk "~2.4.2" + escodegen "~1.11.1" + fs-extra "~7.0.1" + globby "~9.2.0" + into-stream "~5.1.0" + minimist "~1.2.0" + multistream "~2.1.1" + pkg-fetch "~2.6.2" + progress "~2.0.3" + resolve "1.6.0" + stream-meter "~1.0.4" + +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21" + integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE= + +pkginfo@0.x.x: + version "0.4.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" + integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8= + +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +progress@^2.0.0, progress@~2.0.0, progress@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +prompt@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prompt/-/prompt-1.0.0.tgz#8e57123c396ab988897fb327fd3aedc3e735e4fe" + integrity sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4= + dependencies: + colors "^1.1.2" + pkginfo "0.x.x" + read "1.0.x" + revalidator "0.1.x" + utile "0.3.x" + winston "2.1.x" + +propagate@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-1.0.0.tgz#00c2daeedda20e87e3782b344adba1cddd6ad709" + integrity sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk= + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.24, psl@^1.1.28: + version "1.4.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" + integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@^6.5.1: + version "6.9.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.0.tgz#d1297e2a049c53119cb49cca366adbbacc80b409" + integrity sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +read@1.0.x: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= + dependencies: + mute-stream "~0.0.4" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + integrity sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.2.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +regenerator-runtime@^0.13.2: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp.prototype.flags@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" + integrity sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA== + dependencies: + define-properties "^1.1.2" + +regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" + integrity sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw== + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +release-zalgo@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" + integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= + dependencies: + es6-error "^4.0.1" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request-progress@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" + integrity sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4= + dependencies: + throttleit "^1.0.0" + +request@2.88.0, request@^2.55.0, request@~2.88.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" + integrity sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw== + dependencies: + path-parse "^1.0.5" + +resolve@^1.10.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" + integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +revalidator@0.1.x: + version "0.1.8" + resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b" + integrity sha1-/s5hv6DBtSoga9axgZgYS91SOjs= + +rewire@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/rewire/-/rewire-4.0.1.tgz#ba1100d400a9da759fe599fc6e0233f0879ed6da" + integrity sha512-+7RQ/BYwTieHVXetpKhT11UbfF6v1kGhKFrtZN7UDL2PybMsSt/rpLWeEUGF5Ndsl1D5BxiCB14VDJyoX+noYw== + dependencies: + eslint "^4.19.1" + +rimraf@2.x.x, rimraf@^2.6.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + +rxjs@^6.4.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.1.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +secure-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/secure-keys/-/secure-keys-1.0.0.tgz#f0c82d98a3b139a8776a8808050b824431087fca" + integrity sha1-8MgtmKOxOah3aogIBQuCRDEIf8o= + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@~6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" + integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + integrity sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg== + dependencies: + is-fullwidth-code-point "^2.0.0" + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spawn-wrap@^1.4.2: + version "1.4.3" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848" + integrity sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw== + dependencies: + foreground-child "^1.5.6" + mkdirp "^0.5.0" + os-homedir "^1.0.1" + rimraf "^2.6.2" + signal-exit "^3.0.2" + which "^1.3.0" + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stream-meter@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" + integrity sha1-Uq+Vql6nYKJJFxZwTb/5D3Ov3R0= + dependencies: + readable-stream "^2.1.4" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== + dependencies: + has-flag "^3.0.0" + +supports-color@5.5.0, supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +"symbol-tree@>= 3.1.0 < 4.0.0": + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +table@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" + integrity sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA== + dependencies: + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + +table@^5.0.2: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +test-exclude@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" + +text-table@^0.2.0, text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tr46@~0.0.1: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +tslib@^1.9.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" + integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== + dependencies: + commander "~2.20.0" + source-map "~0.6.1" + +uid2@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" + integrity sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I= + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-temp-dir@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz#6dce95b2681ca003eebfb304a415f9cbabcc5385" + integrity sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U= + dependencies: + mkdirp "^0.5.1" + os-tmpdir "^1.0.1" + uid2 "0.0.3" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +utile@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/utile/-/utile-0.3.0.tgz#1352c340eb820e4d8ddba039a4fbfaa32ed4ef3a" + integrity sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo= + dependencies: + async "~0.9.0" + deep-equal "~0.2.1" + i "0.3.x" + mkdirp "0.x.x" + ncp "1.0.x" + rimraf "2.x.x" + +uuid@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +webidl-conversions@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" + integrity sha1-O/glj30xjHRDw28uFpQCoaZwNQY= + +whatwg-url-compat@~0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz#00898111af689bb097541cd5a45ca6c8798445bf" + integrity sha1-AImBEa9om7CXVBzVpFymyHmERb8= + dependencies: + tr46 "~0.0.1" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY= + +winston@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/winston/-/winston-2.1.1.tgz#3c9349d196207fd1bdff9d4bc43ef72510e3a12e" + integrity sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4= + dependencies: + async "~1.0.0" + colors "1.0.x" + cycle "1.0.x" + eyes "0.1.x" + isstream "0.1.x" + pkginfo "0.3.x" + stack-trace "0.0.x" + +wordwrap@1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.0.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= + dependencies: + mkdirp "^0.5.1" + +"xml-name-validator@>= 2.0.1 < 3.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= + +y18n@^3.2.0, y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + +"y18n@^3.2.1 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yargs-parser@^11.1.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= + dependencies: + camelcase "^4.1.0" + +yargs@11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" + +yargs@12.0.4: + version "12.0.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.4.tgz#5ea307c6f11f11881c3bc375f9c939194e8cf4bc" + integrity sha512-f5esswlPO351AnejaO2A1ZZr0zesz19RehQKwiRDqWtrraWrJy16tsUIKgDXFMVytvNOHPVmTiaTh3wO67I0fQ== + dependencies: + cliui "^4.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^3.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^11.1.0" + +yargs@^3.19.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + integrity sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU= + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0"