摘要:
back function (return number) remember the structure Solution 2: dp keywards: how many ways and optimal 70. Climbing Stairs 阅读全文
摘要:
using prev // 90 subset2 sorting the array first and check the contains 阅读全文
摘要:
Permutation the structure of backtracking why copy the list generic list 47: duplicate elements if contains the element why both using visited array B 阅读全文
摘要:
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Idea: traverse solution (inorder postorder, preo 阅读全文
摘要:
beautiful arrangement backtracking for each position check each number. set number to one position 阅读全文
摘要:
1. build the graph and then dfs -- graph <String, List<String>>, (the value is sorted and non- duplicate) Collections.sort(value) 2. dfs we use bottom 阅读全文
摘要:
why pick the long.MIN_VALUE ? beacuse, there is case [1,2, Integer.MIN_VALUE] can not pass it with picking Integer.MIN_VALUE; Follow up what if pick t 阅读全文
摘要:
https://www.lintcode.com/problem/inverted-index-map-reduce/description -- decription of the map reduce problem 1. click the submit button to view the 阅读全文
摘要:
description: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, ju 阅读全文
摘要:
Leetcode ugly number set (3 now) new ugly number is generated by multiplying a prime with previous generated ugly numbe Is ugly number or not //simula 阅读全文