SUBARANJINI N’s Post

Day 78 of #100DaysOfLeetCode 💻✅ Solved #299. Bulls and Cows problem in Java. Approach: • Used a frequency array to track digits • Counted bulls when characters matched directly • Used count array to efficiently track cows • Updated counts to handle unmatched digits Performance: ✓ Runtime: 3 ms (Beats 95.59% submissions) 🚀 ✓ Memory: 43.64 MB (Beats 52.40% submissions) Key Learning: ✓ Learned efficient use of frequency arrays ✓ Improved handling of strings with counting logic ✓ Strengthened understanding of bulls vs cows logic Learning one problem every single day 🚀 #Java #LeetCode #DSA #Strings #Arrays #ProblemSolving #CodingJourney #100DaysOfCode

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories