CTRL + FUTUREπŸ”₯
239 subscribers
198 photos
6 videos
2 files
86 links
Documenting my journey to becoming a Software Engineer
Python | Web Dev | Problem Solving
From beginner to developer πŸš€
Download Telegram
Eid Mubarak ma people ❀️

Wishing all my Muslim friends peace, happiness, and countless blessings on this beautiful day πŸŒ™πŸ€
May your prayers be accepted and your hearts be filled with joy
⚑4❀2
Do you think skills are more important than CGPA in tech? πŸ€”
EID AL-Adha hordoftootni amantii ISLAAMAA hundi keessan baga ittiin isin gahe ayyaana gaaariin isiniif hawwa πŸ‘πŸ‘πŸ˜πŸ˜
❀8⚑1
This summer, I’m continuing my Competitive Programming journey with more consistency and focus

I’ll be sharing:
β€’ My LeetCode progress
β€’ Codeforce problems & contests
β€’ DSA concepts I learn
β€’ Struggles, mistakes, and improvements along the way

The goal is simple improve step by step and become a better problem solver every day πŸ’»

If you’re also learning CP or DSA, feel free to join the journey.
❀6πŸ‘1
Grokking_Algorithms.pdf
6.2 MB
This book is good start as beginner read and understand one algorithm or data structure then do easy then medium then hard problems from leetcode or codeforce
πŸ”₯6
πŸ‘‰Two Sum Problem
I traverse the array one by one and for each element I calculate the complement (target βˆ’ current value). I store the values I have seen in a dictionary and check if the complement already exists.

If it exists, it means those two numbers add up to the target.

My main confusion was not the logic, but the return part the problem asks for indices, not the actual values.
πŸ‘4
If you want to start learning DSA from the beginning, I recommend this NeetCode course. It explains the basics step by step and is good for beginners in competitive programming and problem solving
❀6
Contains Duplicate using a simple idea of storing seen values in a dictionary while traversing the array.

For each number, I check if I have already seen it. If yes, I return True because a duplicate exists. If not, I store it and continue. If the loop finishes without finding any repeated value, I return False.

My main mistake was in the logic flow I was returning False too early inside the loop, and I also forgot that I should check the actual values, not just the indices.
❀3
Valid Anagram using two different approaches.

First, I compared both strings by sorting them and checking if the sorted versions are equal. If they match, it means both strings contain the same characters in the same frequency.

In the second approach, I first checked if the lengths are equal. If they are not equal, I immediately return False. Otherwise, I compare the sorted strings.

My understanding is that both solutions are correct, but adding the length check helps avoid unnecessary work when the strings are clearly not anagrams.
❀3
Group Anagrams
I used a dictionary and grouped words by sorting each word to create a key. Words with the same sorted key are grouped together.

My main mistake was not realizing early that the sorted word should be used as the key, and I was a bit confused about converting the sorted list into a string and building the groups correctly.

Finally, I understood that anagrams become identical after sorting, so we can group them using that idea.
❀4
Today feels like April Fool’s Day 😭
What is happening with our teacher?
That OOP exam was something else. I don’t even know what to say about the result it really wasn’t me πŸ’”
😭6
Good morning guys β˜€οΈ

I have a question for you all πŸ‘€

Do you learn for yourself, your future, and your dreams or mainly to make your family happy and proud?

Tell me your thoughts πŸ‘‡
πŸ€·β€β™‚3πŸ‘€1
Top K Frequent Elements
I used a dictionary to count how many times each number appears in the array. Then I sorted the frequency pairs in descending order and selected the top k frequent elements.

My main confusion was understanding how to sort the dictionary using the frequency values instead of the keys, especially the part with
lambda x: x[1]

I also needed time to fully understand how result.items() becomes (number, result) pairs during sorting.

This problem helped me better understand frequency maps and Top K patterns in problem solving.
❀3
Valid Palindrome
The idea is to first normalize the string by converting it to lowercase and removing all non-alphanumeric characters, then check if it reads the same forward and backward.

My main mistake was not clearly understanding how to properly clean the string, especially removing symbols and spaces. I also initially overcomplicated it using unnecessary loops.

In the end, I learned that the most important step is preprocessing the string correctly before doing the palindrome check.
❀5
Do you think failure is necessary for success?
πŸ†’2✍1
Good morning people ☺️
❀4
Forwarded from Chapi Dev Talks
PSG Vs Arsenal

Who is going to win?

Comment the score and if arsenal loses the correct predictions I will give him prize πŸ˜‚πŸ˜‚πŸ˜‚
😁3❀1
The idea is to encode a list of strings into one string using
length#word

then decode it back by reading the length first and extracting each word.

My mistake was mixing the logic in decode I tried to process the word while still searching for
#

which caused errors. I learned that decoding must follow a clear order find # read length, extract word, then move forward.
መልካም αˆ°αŠ•α‰ α‰΅β€οΈ
❀9