uppala manish’s Post

🗓 Day 2 / 100 – #100DaysOfLeetCode 📌 Problem 1636: Sort Array by Increasing Frequency The task was to sort an array such that elements with lower frequency appear first, and if two elements have the same frequency, the larger number comes first. 🧠 My Approach: Counted element frequencies using a hash map. Sorted the elements by ascending frequency and then by descending value. Reconstructed the array based on sorted frequency order. ⏱ Time Complexity: O(n log n) 💾 Space Complexity: O(n) 💡 Key Learning: This problem reinforced how powerful custom sorting logic can be in Python, especially when handling multiple sort priorities using tuple-based keys in sorting functions. Each day is helping me refine how I think about data organization, sorting, and frequency analysis — small steps that build strong foundations. #100DaysOfLeetCode #LeetCodeChallenge #Python #ProblemSolving #Algorithms #DataStructures #DSA #Sorting #CodingJourney #CodingChallenge #SoftwareEngineering #CompetitiveProgramming #CodeEveryday #LearningInPublic #DeveloperJourney #TechStudent #CareerGrowth #CodingCommunity #KeepLearning

  • graphical user interface, application

To view or add a comment, sign in

Explore content categories