自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 Note for Mandy Leetcode Questions

String Processingcheck if character/** * 判断是否是字母 * @param str 传入字符串 * @return 是字母返回true,否则返回false */public boolean is_alpha(String str) { if(str==null) return false; return str.matches("[a-zA-Z]+");}/** * 判断是否是字母或者数字 * @param str 传入字符串

2020-07-03 22:39:01 122

原创 2021-01-19

import java.util.Arrays; import java.util.Random;public class QuickSelect { public static int partition (int[] arr, int low, int high) { Random randomGenerator = new Random(); int randomInt = randomGenerator.ints(low, high)...

2021-01-20 15:39:51 66

原创 [8/14] M46

46. Permutationsclass Solution { List<List<Integer>> res = new ArrayList<>(); public List<List<Integer>> permute(int[] nums) { dfs(nums, new ArrayList<>()); return res; } public void

2020-08-15 04:07:17 111

原创 [8/11] M39/M40

39. Combination Sumclass Solution { List<List<Integer>> res = new ArrayList<>(); public List<List<Integer>> combinationSum(int[] candidates, int target) { backTrack(candidates, new ArrayList<>(), target,

2020-08-12 13:30:57 176

原创 [8/9] M19/M22/M24/M31/M33/M34/M36

[8/9] M19/M22

2020-08-10 04:46:34 202

原创 [8/8] M15/M16/M17/M18/E20/E21

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

2020-08-10 04:42:36 172

原创 [顺序刷] M6/M8/M11/E12/E14

#11https://leetcode.com/problems/container-with-most-water/submissions/Is it 1D DP?

2020-08-07 13:17:52 76

原创 7/7 [DFS] M366/M1315/M515

M366 Find Leaves of Binary Tree * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNod

2020-07-07 13:41:18 131

原创 [7/5][DFS][Islands Problems] M959/M1254/M694/M1110/M130

M959 Regions Cut By SlashesUnion FindDFS Transformed to Number of Islands problem. int transformFactor = 3; public int regionsBySlashes(String[] grid) { int length = grid.length; int[][] islands = fillIslands(grid); int

2020-07-05 12:04:50 2099

原创 [7/4] [DFS] M199/M979

M199 Binary Tree Right Side View

2020-07-04 11:39:13 412

原创 [7/3] [DFS] E695/M547/M394

Max Area of Island (Easy)Friend Circles (Medium)

2020-07-03 21:38:06 125

原创 4/23 - DFS Questions - M200

M200 - Number of Islandsjavaclass Solution { public int numIslands(char[][] grid) { if (grid == null || grid.length == 0) { return 0; } int numberOfLands = 0;...

2020-04-23 20:53:12 89

原创 DP Questions I. : H862

Dynamic Programming I.Get Familiar with ContextTwo Sum (Sliding window)use start and end pointers.H862: Shortest Subarray with Sum at Least Kclass Solution { public int shortestSubarray(int[]...

2020-04-19 23:01:16 94

原创 LC刷题4/5 - Top FB Questions - M270/ M973

4/5 Facebook Medium Questions270. Closest Binary Search Tree Value/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; *...

2020-04-06 15:05:10 143

原创 LC刷题3/28 - Top FB Questions - E824/E680

LC刷题3/28 - Top FB Questions - E824/E680824. Goat Latinclass Solution { public String toGoatLatin(String S) { String result = ""; String[] wordList = S.split(" "); int ind...

2020-03-29 00:50:47 116

原创 LC刷题3/27 - Top FB Questions - E 543/E 415/E 349

LC刷题3/27 - top fb questions - easy543. Diameter of Binary Tree * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * Tre...

2020-03-27 16:05:32 134

原创 LC刷题3/26 - Facebook Tag - E 1108/E 938/E 953

LC刷题3/261108. Defanging an IP AddressSolution938. Range Sum of BSTSolution953. Verifying an Alien DictionarySolution1108. Defanging an IP Addressclass Solution { public String defangIPaddr(Strin...

2020-03-26 20:35:24 264

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除