Skip to content

Welcome to my coding grind hub! πŸš€ Every LeetCode puzzle I've crushed πŸ’₯ is right here, with detailed breakdowns πŸ“. #RoadToSpotify πŸ›£οΈ

Notifications You must be signed in to change notification settings

nmashchenko/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 

Repository files navigation

My LeetCode Journey πŸš€

Introduction

Hello there! πŸ‘‹ This is where I chronicle my coding grind, breaking down each problem I tackle on LeetCode. Follow along to see my thought processes, the challenges I've encountered, and the strategies that have worked for me!

LeetCode user pRod1gy_

Accepted all Accepted easy Accepted medium Accepted hard

Solved all Solved easy Solved medium Solved hard


πŸ“ˆ Progress Overview

  • Total Problems Solved: 4
  • Easy Problems: 4
  • Medium Problems: 0
  • Hard Problems: 0

πŸ’‘ Some important notes for me

Best playlist to code: https://open.spotify.com/playlist/5LodgsmFfRYAojTwEZ9ulR?si=bcf8faee8e4b4f2a


🧠 Problem Breakdowns

Easy 🟒

  • Approach: Simple approach by just going through all element of array
  • Challenges: No challenges
  • Time Complexity: 0(n^2)
  • Space Complexity: 0(1)
  • Approach: Compare original string to reversed one
  • Challenges: No challenges
  • Time Complexity: 0(n)
  • Space Complexity: 0(n)
  • Approach: The problem here is that we can meet next values that can be combination of prev+next, so what we do here is basically, when we see a number that is less than the next number, we substract first digit and then add second (like IV: substract 1 from total and add 5 results in 4)
  • Challenges: Coming up with the optimized version, originally just hardcoded values (which is not cool lol)
  • Time Complexity: 0(n)
  • Space Complexity: 0(1)
  • Approach: Sort array to make sure all common strings will be next to each other, then just compare first and last element letters and see when they don't equal to each other, on that point we found substring
  • Challenges: Come up with sorting
  • Time Complexity: O(n log n)
  • Space Complexity: 0(1)
  • Approach: Create a map of valid parentheses and basically use stack to solve, go through each char of string and if it's opening parentheses, add to stack, otherwise pop and check if it's valid, also make sure that stack is empty in the end
  • Challenges: No challenges
  • Time Complexity: O(n)
  • Space Complexity: 0(n)
  • Approach: Create new list with head node, then just go through lists (while they both exists) and compare which number is less and add this number to head (don't forget to advance pointer on original lists, finally check if any list still has items and add all of that items to the end)
  • Challenges: Refresh mind on linked lists (lol)
  • Time Complexity: O(m + n)
  • Space Complexity: 0(1)
  • Approach: Make set from array and then just return length of this array, also fill the original array with values to match the problem description
  • Challenges: Understand the problem (lol x2)
  • Time Complexity: O(n)
  • Space Complexity: 0(n)

Medium 🟑

1. [Problem Name with Link]

  • Approach: Brief description of your approach.
  • Challenges: What challenges did you face and how did you overcome them?
  • Time Complexity: Your analysis.
  • Space Complexity: Your analysis.

... [Repeat for other medium problems]

Hard πŸ”΄

1. [Problem Name with Link]

  • Approach: Brief description of your approach.
  • Challenges: What challenges did you face and how did you overcome them?
  • Time Complexity: Your analysis.
  • Space Complexity: Your analysis.

... [Repeat for other hard problems]


πŸ† Milestones

  • 08/28/23: Started the grind

About

Welcome to my coding grind hub! πŸš€ Every LeetCode puzzle I've crushed πŸ’₯ is right here, with detailed breakdowns πŸ“. #RoadToSpotify πŸ›£οΈ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published