๐ 3 Days into My DSA Journey: Brute-Forcing My Way into Better Thinking

Published on May 24, 2025 | 4 min read
By: Piyush Kumar | Portfolio | GitHub
TL;DR: Starting my Data Structures and Algorithms journey with brute force solutions. Here's what I learned solving Two Sum, Longest Substring, and Palindrome problems in 3 days - plus all my code and key insights for fellow beginners.
Why I'm Documenting My DSA Journey Publicly
If you're a beginner programmer or computer science student wondering whether to start DSA, this post is for you. I'm sharing my raw, unfiltered experience because:
๐ Accountability: Public learning keeps me consistent
๐ค Community: Help others avoid my mistakes
๐ก Growth: Teaching reinforces my own learning
The Reality Check: You don't need to be perfect to start. You just need to start.
๐ง Day 1: Time Complexity Reality Check - Two Sum Problem
The Problem That Humbled Me
Problem: Two Sum (LeetCode Easy)
My Approach: Brute Force (Nested Loops)
Time Complexity: O(nยฒ)
Space Complexity: O(1)
# My first attempt - brute force
def two_sum_brute_force(nums, target):
for i in range(len(nums)):
for j in range(i + 1, len(nums)):
if nums[i] + nums[j] == target:
return [i, j]
๐ก Key Learnings:
Big O isn't just theory - it's the language of scalable code
Nested loops = performance nightmare for large datasets
Sometimes brute force helps you understand the problem better
What's Next:
Implement HashMap solution (O(n) time complexity)
Compare performance with larger datasets
๐ก Day 2: String Manipulation Challenge - Longest Substring
When "Medium" Feels Like "Hard"
Problem: Longest Substring Without Repeating Characters
Difficulty: Medium (felt like Expert ๐
)
My Approach: Brute Force with Set
Time Complexity: O(nยณ)
# Character tracking gets messy fast!
def lengthOfLongestSubstring(str1):
max_length = 0
n = len(str1)
for i in range(n):
sub1 = []
for j in range(i, n):
if str1[j] not in sub1:
sub1.append(str1[j])
else:
break
max_length = max(max_length, len(sub1))
return max_length
๐ฏ Breakthrough Moments:
Character tracking is trickier than it looks
Sliding window technique exists for a reason (implementing next!)
Brute force taught me the core challenge before optimization
๐ Day 3: Pattern Recognition - Palindrome Validation
Finally, A Win That Felt Good!
Problem: Valid Palindrome
Difficulty: Easy
Approach: Two-Pointer Technique
Time Complexity: O(n)
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:
max_length = 0
n = len(s)
for i in range(n):
sub1 = []
for j in range(i, n):
if s[j] not in sub1:
sub1.append(s[j])
else:
break
max_length = max(max_length, len(sub1))
return max_length
๐ Why This Felt Different:
Two-pointer technique clicked immediately
Clean string manipulation made the solution elegant
First time I felt "this is how algorithms should work"
๐ My 3-Day Progress Analytics
Metric | Result |
Problems Solved | 3 |
Time Spent | ~6 hours |
Lines of Code | 150+ |
"Aha!" Moments | 4 |
Debugging Sessions | Too many to count ๐ |
๐ฏ Key Insights for Fellow Beginners
โ What's Working:
Start with brute force - understand the problem first
Document everything - your future self will thank you
Time complexity awareness - changes how you think about code
Consistency > perfection - small daily progress compounds
๐ซ What I'm Avoiding:
Comparing my Day 3 to someone's Day 300
Skipping the "boring" fundamentals
Optimizing before understanding
๐ฎ What's Coming Next Week
Immediate Goals:
Optimize existing solutions using better algorithms
Master sliding window technique for substring problems
Implement HashMap solutions for O(n) time complexity
Document daily learnings on Twitter
Learning Resources I'm Using:
LeetCode for problems
YouTube for visual explanations
GitHub for code organization
This blog for accountability
๐ค Join My Learning Journey
Are you learning DSA too? Let's grow together!
Connect with me:
๐ฆ Twitter: @CodeWithPiyush - Daily updates
๐ผ LinkedIn: Piyush Kumar - Professional updates
๐ป GitHub: DSA Problems Repository - All my code
๐ Portfolio: aiwithpiyush.netlify.app - Full projects
How You Can Help:
โญ Star my repo if you find it helpful
๐ฌ Share your own DSA journey in the comments
๐ Retweet to help other beginners find this
๐จ DM me your questions - I'll try to help!
๐ Recommended for Beginners
If you're just starting:
Don't skip Big O notation - it's fundamental
Code along, don't just read - muscle memory matters
Explain your solution out loud - teaches you to think clearly
Join online communities - learning together is faster
Remember: Every expert was once a beginner. Every pro was once an amateur. Every icon was once an unknown.
The best time to start was yesterday. The second best time is now.
Found this helpful? Follow my journey and let's master DSA together! Drop a comment below with your own learning experiences.
Tags: #DSA #DataStructures #Algorithms #Programming #Python #LeetCode #TechCareer #CodingJourney #BeginnerFriendly #TechBlog
About the Author:
I am a passionate developer documenting My journey from beginner to proficient in Data Structures and Algorithms. Follow my daily progress and learn together with the community.
Subscribe to my newsletter
Read articles from Piyush Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Piyush Kumar
Piyush Kumar
Hey there! Iโm Piyush Kumar, a curious mind on a mission to master Data Structures & Algorithms โ one problem at a time. Iโm not just solving questions; Iโm building habits, debugging my thinking, and documenting the highs and lows of my coding grind. Whether itโs arrays at midnight, graph theory before coffee, or that satisfying โACโ moment after 17 failed attempts โ Iโm sharing it all openly. ๐ Currently on a 90-day DSA challenge, I post daily blogs and code logs that unpack: Real-world problem-solving strategies Patterns and techniques I learn (and unlearn) Honest reflections on growth, failure, and consistency Along the way, Iโm also exploring how to apply AI to meaningful problems โ because I believe in learning out loud and building in public. Letโs connect if youโre into: Open learning journeys ๐ Problem-solving and pattern recognition ๐ง Building cool things with code โ๏ธ โก Follow along and letโs decode DSA โ together!