1021. Remove Outermost Parenthesesclass Solution { public String removeOuterParentheses(String s) { StringBuilder result = new StringBuilder(); int depth = 0; for (char c : s.toCharArray()) { if (c == '(') { if (depth > 0) { ...Aug 7, 2025·1 min read
197. Rising TemperatureSELECT w1.id FROM Weather w1 JOIN Weather w2 ON DATEDIFF(w1.recordDate, w2.recordDate) = 1 WHERE w1.temperature > w2.temperature;Aug 6, 2025·1 min read
1581. Customer Who Visited but Did Not Make Any TransactionsSELECT v.customer_id, COUNT(v.visit_id) AS count_no_trans FROM Visits v LEFT JOIN Transactions t ON v.visit_id = t.visit_id WHERE t.transaction_id IS NULL GROUP BY v.customer_id;Aug 6, 2025·1 min read
Generate Parenthesisclass Solution { public List<String> generateParenthesis(int n) { List<String> res = new ArrayList<String>(); recurse(res,0,0,"",n); return res; } public void recurse(List<String> res, int left, int right, String ...Aug 6, 2025·1 min read
Search Insertclass Solution { public int searchInsert(int[] nums, int target) { int left = 0; int right = nums.length-1; while(left<=right){ int mid = (left+right)/2; if(nums[mid]==target){ retur...Aug 6, 2025·1 min read