leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

Leetcode solutions

Results 602 leetcode issues
Sort by recently updated
recently updated
newest added

[//]: # "Pull Request Template" [//]: # "Replace the placeholder values in the template below" - **File(s) Modified**: _1968-array-with-elements-not-equal-to-average-of-neighbors.py_ - **Language(s) Used**: _python_ - **Submission URL**: _https://leetcode.com/problems/array-with-elements-not-equal-to-average-of-neighbors/submissions/948811472/_ [//]: # "Getting...

- **File(s) Modified**: _0235-lowest-common-ancestor-of-a-binary-search-tree.js_ - **Language(s) Used**: _javascript_ ### Description The time complexity of the current solution should be O(H), **not** O(N) when N is the total number of node...

File Modified: 0554-brick-wall.cs Language(s) Used: C# Submission URL: https://leetcode.com/problems/brick-wall/submissions/941197569/

- **File(s) Modified**: 0036-valid-sudoku.swift - **Language(s) Used**: Swift - **Submission URL**: https://leetcode.com/submissions/detail/916714053/

You can skip usage of the 'visit' set. All you need is just add a condition 'if rooms[r][c] >= dist:' in line 34. It reduces memory usage as well as...

### - **File Modified**: _0020-valid-parentheses.java_ - **Language(s) Used**: _Java_ - **Submission URL**: _https://leetcode.com/problems/valid-parentheses/submissions/944836710/_ - **Reason**: - Use correct APIs of Stack in Java - uses the process explained in video...

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return the...

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Input: nums = [1,1,2] Output: [[1,1,2], [1,2,1], [2,1,1]] Input: nums = [2,2,1,1]...

- **File(s) Modified**: _0701-insert-into-a-binary-search-tree.java_ - **Language(s) Used**: _java_ - **Submission URL**: _https://leetcode.com/problems/[problem-name]/submissions/916087796/_

[//]: # "Pull Request Template" [//]: # "Replace the placeholder values in the template below" - **File(s) Modified**: _0028-find-the-index-of-the-first-occurrence-in-a-string.java_ - **Language(s) Used**: _java_ - **Submission URL**: _https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/submissions/910556174/_ [//]: # "Getting...