Muhammad Azim Amjad’s Post

View profile for Muhammad Azim Amjad, graphic

Software Developer | Django • React.js • Node.js • Python

Leetcode Challenge Problem 347:Top K Frequent Elements (https://lnkd.in/g_3piXcG) ✨Today while reviewing other submissions at the end, I learned instead of write your own method from scratch like the second loop in this code is unnesscary instead i could use slice method to limit the number of values i could get. 🔧 From line number 14 to 21 could be replaced by the builtin functions and optimized solution, i have attached in second screenshot, do give it a look. Give your reviews. #100daysofcodechallenge #coding #programmer #problems #leetcode #neetcode #dsa #algorithm #typescript #maps #leetcode347 #leetcodeproblems

To view or add a comment, sign in

Explore topics