🚀 Day 1 of My DSA Journey | Count Digits | Striver’s A2Z DSA Sheet | Java
Simplify with 😊 vaishnavi
0:00 / 0:00
🚀 Day 1 of My DSA Journey | Count Digits | Striver’s A2Z DSA Sheet | Java
14 просмотров · 3 дн. назад
Simplify with 😊 vaishnavi
15 подписчиков
14 просмотров · 3 дн. назад
🚀 Day 1 of My DSA Journey | Count Digits | Striver’s A2Z DSA Sheet | Java
Welcome to Day 1 of my DSA journey! 🎯
In this video, I’m starting my journey with Striver’s A2Z DSA Sheet, and we begin with the Basic Maths section.
📌 Today’s Problem: Count Digits
Given an integer "n", we have to return the number of digits in n.
For example:
"n = 234"
Number of digits = "3"
In this video, I explain the problem from scratch and cover:
✨ Understanding the question
✨ Building the logic step by step
✨ Why we divide the number by "10"
✨ How "n / 10" removes the last digit
✨ Complete dry run with "n = 234"
✨ Java solution
✨ Line-by-line code explanation
✨ Final takeaway for remembering the logic
The main idea is:
Divide by 10 → Remove one digit → Increase count → Repeat until n becomes 0
This is just the beginning of my DSA journey, and I’ll be solving one problem every day and sharing my learning along the way. 💻📚
If you're also learning DSA from scratch, you can join me on this journey!
👍 Like the video if it helped you
💬 Comment your thoughts or doubts
🔔 Subscribe and follow the journey
📤 Share it with someone who is starting DSA
Next Problem → Reverse a Number
#DSA #DSAJourney #Day1 #CountDigits #StriversA2ZDSASheet #Java #DSAinJava #Coding #LearnDSA #Programming #BasicMaths #CodingJourney