问题描述:You’re given strings J representing the types of stones that are jewels, and S representing the sto…
496. Next Greater Element I[Easy]
送分题。可以用while的。有人用了Hashmap和stack,我就不看了。 public int[] nextGreaterElement(int[] findNums, int[] nums) { int[] res…
276. Paint Fence
276- Paint Fence **My SubmissionsQuestion Editorial Solution Total Accepted: 10079 Total Submissions: 31886 Di…
293. Flip Game
My Submissions Total Accepted: 15789 Total Submissions: 29826 Difficulty: Easy Contributors: Admin You are pla…
375. Guess Number Higher or Lower II
My Submissions Total Accepted: 14213 Total Submissions: 40773 Difficulty: Medium Contributors: Admin We are pl…
401. Binary Watch
My Submissions Total Accepted: 7205 Total Submissions: 16751 Difficulty: Easy A binary watch has 4 LEDs on the…
368. Largest Divisible Subset
Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements i…
606. Construct String from Binary Tree
You need to construct a string consists of parenthesis and integers from a binary tree with the preorder trave…
[LeetCode] Symmetric Tree
1、题目名称 101. Symmetric Tree https://leetcode.com/problems/symmetric-tree/ 2、题目内容 Given a binary tree, check whe…
463. Island Perimeter
这题飞机上写的。边界条件蛮多的,以为会错但竟然一次AC了。 如果我不知道这是一道easy题,应该就想不出来了。。 public int islandPerimeter(int[][] grid) { int res = …
309. Best Time to Buy and Sell Stock with Cooldown
Total Accepted: 17241 Total Submissions: 46340 Difficulty: Medium Say you have an array for which the ith elem…
244. Shortest Word Distance II
My Submissions Total Accepted: 16006 Total Submissions: 46068 Difficulty: Medium Contributors: Admin This is a…