摘要:
class Solution { private String[] lessThanTwenty = { "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twe 阅读全文
posted @ 2022-04-12 07:04
阳光明媚的菲越
阅读(23)
评论(0)
推荐(0)
摘要:
This problem remember one thing, using HashMap as data structure: class Solution { Map<Integer, Node> map = new HashMap<>(); public Node cloneGraph(No 阅读全文
posted @ 2022-04-12 07:03
阳光明媚的菲越
阅读(17)
评论(0)
推荐(0)
摘要:
My first solution: class Solution { private int sum =0; public int sumNumbers(TreeNode root) { preOrder(root, ""); return sum; } private void preOrder 阅读全文
posted @ 2022-04-12 04:48
阳光明媚的菲越
阅读(9)
评论(0)
推荐(0)
摘要:
My back tracking solution1: class Solution { List<String> res = new ArrayList<>(); Set<String> set = new HashSet<>(); public List<String> wordBreak(St 阅读全文
posted @ 2022-04-12 04:17
阳光明媚的菲越
阅读(23)
评论(0)
推荐(0)
摘要:
My Solution: class Solution { public List<List<Integer>> findRLEArray(int[][] encoded1, int[][] encoded2) { int i=0,j=0; List<int[]> list = new ArrayL 阅读全文
posted @ 2022-04-12 04:01
阳光明媚的菲越
阅读(27)
评论(0)
推荐(0)
摘要:
My BFS solution: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * Tr 阅读全文
posted @ 2022-04-12 01:22
阳光明媚的菲越
阅读(24)
评论(0)
推荐(0)
浙公网安备 33010602011771号