[LeetCode] 1291. Sequential Digits An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers in the range [low, high] inclusive that have sequ 2020-09-20 #leetcode #java #bfs #dfs #enumeration
[LeetCode] 421. Maximum XOR of Two Numbers in an Array Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n.Example 1:Input: nums = [3,10,5,25,2,8]Output: 28Explanation: The maximum r 2020-09-17 #leetcode #java #bit manipulation #trie
[LeetCode] 875. Koko Eating Bananas Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko can decide her bananas-per-hour eating speed of 2020-09-09 #leetcode #array #java #binary search #binary search on answer
[LeetCode] 429. N-ary Tree Level Order Traversal Given an n-ary tree, return the level order traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null 2020-09-07 #leetcode #java #tree #bfs
590. N-ary Tree Postorder Traversal Given the root of an n-ary tree, return the postorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated b 2020-08-13 #leetcode #java #tree #postorder #n-ary tree
[LeetCode] 622. Design Circular Queue Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle, and the last positio 2020-08-03 #leetcode #array #java #design #queue
[LeetCode] 529. Minesweeper Let’s play the minesweeper game (Wikipedia, online game)! You are given an m x n char matrix board representing the game board where: ‘M’ represents an unrevealed mine,‘E’ represents an unrevealed emp 2020-07-23 #leetcode #array #java #dfs #matrix
[LeetCode] 417. Pacific Atlantic Water Flow There is an m x n rectangular island that borders both the Pacific Ocean and Atlantic Ocean. The Pacific Ocean touches the island’s left and top edges, and the Atlantic Ocean touches the island’s righ 2020-07-23 #leetcode #java #bfs #dfs #flood fill
[LeetCode] 329. Longest Increasing Path in a Matrix Given an m x n integers matrix, return the length of the longest increasing path in matrix. From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonall 2020-07-22 #leetcode #array #java #dfs #matrix #memoization
[LeetCode] 1100. Find K-Length Substrings With No Repeated Characters Given a string s and an integer k, return the number of substrings in s of length k with no repeated characters. Example 1:Input: s = “havefunonleetcode”, k = 5Output: 6Explanation: There ar 2020-07-20 #leetcode #hashmap #java #sliding window #sliding window with fixed size #string