https://github.com/jpal91/leetcode
Solutions and examples from my LeetCode profile
https://github.com/jpal91/leetcode
leetcode leetcode-python leetcode-solutions
Last synced: 8 months ago
JSON representation
Solutions and examples from my LeetCode profile
- Host: GitHub
- URL: https://github.com/jpal91/leetcode
- Owner: jpal91
- Created: 2022-10-13T13:24:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T22:37:36.000Z (almost 3 years ago)
- Last Synced: 2025-01-10T11:39:15.579Z (10 months ago)
- Topics: leetcode, leetcode-python, leetcode-solutions
- Language: Python
- Homepage:
- Size: 516 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LeetCode
### Solutions and examples from my LeetCode profile
#### Objective
The purpose of this project is to provide some of my solutions to the various problems on the popular code challenge site, LeetCode. As I have studied various algorithims that are popular to solve these questions, I want to reiterate my thought process in order to feel more confident when I come up to similar problems in the future.#### This is an ongoing project
Not all of my solutions are included here. The shield below tracks the running total of problems solved, and more will be added in the future.
[](https://leetcode.com/jpal91/)---
## Tables
- [Python](#python)
- [SQL](#sql)***
## Python
| Solution | LC Link | Screenshot |
|----------|---------|------------|
|[3Sum](/Python/3sum.py) | [LC](https://leetcode.com/problems/3sum) | |
|[Contains Duplicate](/Python/contains-duplicate.py) | [LC](https://leetcode.com/problems/contains-duplicate/) | |
|[Contains Duplicate II](/Python/contains-duplicate-ii.py) | [LC](https://leetcode.com/problems/contains-duplicate-ii) ||
|[Course Schedule](/Python/course-schedule.py) | [LC](https://leetcode.com/problems/course-schedule/) ||
|[Determine Whether Matrix Can be Obtained By Rotation](/Python/determine-whether-matrix.py) | [LC](https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/) |[Screenshot](/Screenshots/determine-whether-matrix.JPG)|
|[Find First Palindromic String in the Array](/Python/find-first-palindromic-string.py) | [LC](https://leetcode.com/problems/find-first-palindromic-string-in-the-array/) ||
|[Flip Game](/Python/flip-game.py) | [LC](https://leetcode.com/problems/flip-game) ||
|[Valid Anagram](/Python/group-anagram.py) | [LC](https://leetcode.com/problems/valid-anagram/) |[Screenshot](/Screenshots/group-anagrams.jpg)|
|[How Many Numbers Are Smaller Than the Current Number](/Python/how-many-numbers-are-smaller.py) | [LC](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/) ||
|[Largest 3 Same Digit Number In String](/Python/largest-3-same-digit-number.py) | [LC](https://leetcode.com/problems/largest-3-same-digit-number-in-string) | [Screenshot](/Screenshots/largest-3-same-digit-number.JPG)|
|[Maximum Depth of a N-Ary Tree](/Python/maximum-depth-of-n-ary-tree.py) | [LC](https://leetcode.com/problems/maximum-depth-of-n-ary-tree) | [Screenshot](/Screenshots/maximum-depth-of-n-ary-tree.JPG) |
|[Print Binary Tree](/Python/print-binary-tree.py) | [LC](https://leetcode.com/problems/print-binary-tree) | [Screenshot](/Screenshots/print-binary-tree.JPG)|
|[Recover Binary Search Tree](/Python/recover-binary-search-tree.py) | [LC](https://leetcode.com/problems/recover-binary-search-tree/) | [Screenshot](/Screenshots/recover-binary-search-tree.JPG)|
|[Top K Frequent Elements](/Python/top-k-frequent-elements.py)|[LC](https://leetcode.com/problems/top-k-frequent-elements)|[Screenshot](/Screenshots/top-k-frequent-elements.jpg)
|[Two Sum](/Python/two-sum.py)|[LC](https://leetcode.com/problems/two-sum/)||
|[Univalued Binary Tree](/Python/univalued-binary-tree.py)|[LC](https://leetcode.com/problems/univalued-binary-tree/)|[Screenshot](/Screenshots/univalued-binary-tree.py)|
|[Valid Anagram](/Python/valid-anagram.py)|[LC](https://leetcode.com/problems/valid-anagram/)||
|[Zig-zag Conversion](/Python/zigzag-conversion.py)|[LC](https://leetcode.com/problems/zigzag-conversion/)||
|[Maximum Number of Balloons](/Python/maximum-number-of-balloons.py)|[LC](https://leetcode.com/problems/maximum-number-of-balloons/)|[Screenshot](https://assets.leetcode.com/users/images/5a313fe0-0260-4693-a1ec-2afc40af272e_1666389742.8823123.jpeg)
|[Merge Two Sorted Lists](/Python/merge-two-sorted-lists.py)|[LC](https://leetcode.com/problems/merge-two-sorted-lists/)|[Screenshot](/Screenshots/merge-two-sorted-lists.jpg)|
|[Remove Linked List Elements](/Python/remove-linked-list-elements.py)|[LC](https://leetcode.com/problems/remove-linked-list-elements)|[Screenshot](/Screenshots/remove-linked-list-elements.jpg)|
|[Valid Parentheses](/Python/valid-parentheses.py)|[LC](https://leetcode.com/problems/valid-parentheses/)|[Screenshot](/Screenshots/valid-parentheses.jpg)|
|[Merge Strings Alternately](/Python/merge-strings-alternately.py)|[LC](https://leetcode.com/problems/merge-strings-alternately)|[Screenshot](/Screenshots/merge-strings-alternately.jpg)|
|[Find Leaves of Binary Tree](/Python/find-leaves-of-binary.py)|[LC](https://leetcode.com/problems/find-leaves-of-binary-tree)||
|[Employee Importance](/Python/employee-importance.py)|[LC](https://leetcode.com/problems/employee-importance)||
|[Shortest Word Distance II](/Python/shortest-word-distance-ii.py)|[LC](https://leetcode.com/problems/shortest-word-distance-ii)|[Screenshot](/Screenshots/shortest-word-distance-ii.jpg)|
|[Maximize Sum Of Array After K Negations](/Python/maximize-sum-of-array.py)|[LC](https://leetcode.com/problems/maximize-sum-of-array-after-k-negations)||
|[Time Needed to Buy Tickets](/Python/time-needed-to-buy.py)|[LC](https://leetcode.com/problems/time-needed-to-buy-tickets)||
|[Minimum Amount of Time to Fill Cups](/Python/minimum-amount-of-time.py)|[LC](https://leetcode.com/problems/minimum-amount-of-time-to-fill-cups)||
|[First Unique Character in a String](/Python/first-unique-character.py)|[LC](https://leetcode.com/submissions/detail/830038320/)||
|[Reverse Linked List](/Python/reverse-linked-list.py)|[LC](https://leetcode.com/submissions/detail/830221570/)||
|[Linked List Cycle](/Python/linked-list-cycle.py)|[LC](https://leetcode.com/submissions/detail/830160081/)||
|[Valid Sudoku](/Python/valid-sudoku.py)|[LC](https://leetcode.com/submissions/detail/830021528/)||
|[Maximum Number of Balloons](/Python/maximum-number-of-balloons.py)|[LC](https://leetcode.com/problems/maximum-number-of-balloons/)|[Screenshot](/Screenshots/maximum-number-of-balloons.JPG)|
|[Meeting Rooms](/Python/meeting-rooms.py)|[LC](https://leetcode.com/problems/meeting-rooms/)||
|[Range Sum Query 2D - Immutable](/Python/range-sum-query-2d--.py)|[LC](https://leetcode.com/problems/range-sum-query-2d---immutable)||
|[Design File System](/Python/design-file-system.py)|[LC](https://leetcode.com/problems/design-file-system)||
|[Design Front Middle Back Queue](/Python/design-front-middle-back.py)|[LC](https://leetcode.com/problems/design-front-middle-back-queue)||
|[Map Sum Pairs](/Python/map-sum-pairs.py)|[LC](https://leetcode.com/problems/map-sum-pairs)|[Screenshot](/Screenshots/map-sum-pairs.JPG)|
|[Design A Leaderboard](/Python/design-a-leaderboard.py)|[LC](https://leetcode.com/problems/design-a-leaderboard)|[Screenshot](/Screenshots/design-a-leaderboard.JPG)|
|[Unique Word Abbreviation](/Python/unique-word-abbreviation.py)|[LC](https://leetcode.com/problems/unique-word-abbreviation)|[Screenshot](/Screenshots/unique-word-abbreviation.JPG)|
|[Merge k Sorted Lists](/Python/merge-k-sorted-lists.py)|[LC](https://leetcode.com/problems/merge-k-sorted-lists)|[Screenshot](/Screenshots/merge-k-sorted-lists.jpg)|
|[Validate Binary Search Tree](/Python/validate-binary-search.py)|[LC](https://leetcode.com/problems/validate-binary-search-tree)|[Screenshot](/Screenshots/validate-binary-search-tree.jpg)|
|[Same Tree](/Python/same-tree.py)|[LC](https://leetcode.com/problems/same-tree)|[Screenshot](/Screenshots/same-tree.jpg)|
|[Number of Islands](/Python/number-of-islands.py)|[LC](https://leetcode.com/problems/number-of-islands)||
|[Remove All Adjacent Duplicates In String](/Python/remove-all-adjacent.py)|[LC](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string)|[Screenshot](/Screenshots/remove-all-adjacent-duplicates.JPG)|***
## SQL
| Solution | LC Link | Screenshot |
|----------|---------|------------|
|[Number of Accounts That Did Not Stream](/SQL/number-of-accounts-that.sql)|[LC](https://leetcode.com/problems/number-of-accounts-that-did-not-stream)||
|[Second Highest Salary](/SQL/second-highest-salary.sql)|[LC](https://leetcode.com/problems/second-highest-salary)||
|[Number of Unique Subjects Taught by Each Teacher](/SQL/number-of-unique.sql)|[LC](https://leetcode.com/problems/number-of-unique-subjects-taught-by-each-teacher)||
|[Ad-Free Sessions](/SQL/ad-free-sessions.sql)|[LC](https://leetcode.com/problems/ad-free-sessions)||
|[Primary Department for Each Employee](/SQL/primary-department-for.sql)|[LC](https://leetcode.com/problems/primary-department-for-each-employee)||
|[Product's Price for Each Store](/SQL/product's-price-for-each.sql)|[LC](https://leetcode.com/problems/product's-price-for-each-store)||
|[Find Total Time Spent by Each Employee](/SQL/find-total-time-spent-by.sql)|[LC](https://leetcode.com/problems/find-total-time-spent-by-each-employee)||
|[The Number of Employees Which Report to Each Employee](/SQL/the-number-of-employees.sql)|[LC](https://leetcode.com/problems/the-number-of-employees-which-report-to-each-employee)||
|[Find Followers Count](/SQL/find-followers-count.sql)|[LC](https://leetcode.com/problems/find-followers-count)||
|[Daily Leads and Partners](/SQL/daily-leads-and-partners.sql)|[LC](https://leetcode.com/problems/daily-leads-and-partners)||
|[Product's Worth Over Invoices](/SQL/product's-worth-over.sql)|[LC](https://leetcode.com/problems/product's-worth-over-invoices)||
|[Average Time of Process per Machine](/SQL/average-time-of-process.sql)|[LC](https://leetcode.com/problems/average-time-of-process-per-machine)||
|[Percentage of Users Attended a Contest](/SQL/percentage-of-users.sql)|[LC](https://leetcode.com/problems/percentage-of-users-attended-a-contest)||
|[All Valid Triplets That Can Represent a Country](/SQL/all-valid-triplets-that.sql)|[LC](https://leetcode.com/problems/all-valid-triplets-that-can-represent-a-country)||
|[Sellers With No Sales](/SQL/sellers-with-no-sales.sql)|[LC](https://leetcode.com/problems/sellers-with-no-sales)||
|[Market Analysis I](/SQL/market-analysis-i.sql)|[LC](https://leetcode.com/problems/market-analysis-i)||***