Skip to main content

Command Palette

Search for a command to run...

Day 11 in Bangalore

Published
β€’2 min read
Day 11 in Bangalore
πŸ‘‹
Hi, I'm Pranay Sinha, a 3rd year B.Tech student with a keen interest in the tech industry and a passion for learning.

I'm on a mission to master programming and tackle any coding challenge that comes my way. In this series, you'll find my daily journal entries, presented as simple bullet points. Nothing fancyβ€”just my honest thoughts and experiences from each day. So, please, no judgment! πŸ˜‚

Join me as I document my tech journey in Bangalore. Let's dive in!

Day 11 (10/07/24)

  • Today's LeetCode question was an easy one 1598. Crawler Log Folder

    This one wasn't even a challenge. At first I thought I should use a stack to keep track of the operations but immediately realized that there's no need to keep track of the folder names. All we need is the depth of the folder structure at the end of all operations. If the log would be anything other than '../' or './' we would just add one to the depth. And if the log is '../' we would subtract one from the depth (if depth is greater than 0 obviously). At the end we just return the final depth.

      class Solution:
          def minOperations(self, logs: List[str]) -> int:
              n = 0
              for log in logs:
                  if log == "../":
                      n -= 1 if n > 0 else 0
                  elif log != "./":
                      n += 1
    
              return n
    
  • Since I completed Mob Psycho, I started watching Bleach. So far it's been kinda boring hoping that the 2nd arc picks up the pace.

  • Watched a couple episodes of Dr. House, really enjoying the show. Every episode has the exact same storyline and there's a lack of character development but it's enjoyable nonetheless.

  • Was looking around for the exact implementation of python lists and came across numpy arrays vs python lists. So I decided it's finally time to actually learn numpy πŸ˜‚ (And yeah I wasn't able to find the exact implementation of lists, probably should have looked in the docs now that I think about it πŸ€”)

Anyway I started watching a video series on numpy! That's about it for today, See ya!

Bangalore Tech Diaries

Part 9 of 12

I will be documenting the journey through my days in Bangalore, starting from June 30th. No frills, just honest documentation of what I manage to accomplish each dayβ€”minus the procrastination!

Up next

Day 33 in Bangalore

πŸ‘‹ Hi, I'm Pranay Sinha, a 3rd year B.Tech student with a keen interest in the tech industry and a passion for learning. I'm on a mission to master programming and tackle any coding challenge that comes my way. In this series, you'll find my daily ...