CTRL + FUTURE๐Ÿ”ฅ
239 subscribers
198 photos
5 videos
2 files
86 links
Documenting my journey to becoming a Software Engineer
Python | Web Dev | Problem Solving
From beginner to developer ๐Ÿš€
Download Telegram
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
Roman to Integer
I first used a dictionary to map each Roman symbol to its value, then I traverse the string one by one.

For each character, I get its value and try to build the total answer.

My main confusion was that I was only focusing on the current character. I didnโ€™t realize I also need to compare it with the next character to decide whether to add or subtract.

Now I understand:

If current value < next value โ†’ subtract
Otherwise โ†’ add
โค3๐Ÿ”ฅ2
๐Ÿ™„แˆแˆญแŒซ แŠฅแŠ•แ‹ดแ‰ต แАแ‰ แˆญ ?
๐Ÿ˜6
Idea Your Opinion Needed

Iโ€™m thinking to start a small coding challenge in this channel.

๐Ÿ’ก If someone solves a problem, Iโ€™ll give 50 Birr airtime
โœ”๏ธ No AI allowed
โœ”๏ธ Must explain the solution

Do you think this is a good idea and helpful?

Drop your thoughts ๐Ÿ‘‡
๐Ÿ‘3
Drop your thoughts not reaction๐Ÿ˜ฌ
Integer to Roman

I used a dictionary and looped from largest to smallest value. For each value, I keep adding the symbol while it fits in the number and subtracting it.

My mistake was thinking like a list and trying to index the number instead of using a greedy approach.
๐Ÿ”ฅ4
Forwarded from shego.codes
๐Ÿ’Œ
"God protect me from everyone's and my own stupidity."

#เฑจเงŽโ €
โ €โ € โ €โ € โ €โ € โ €โ € โ €โ € โ €โ € โ €โ €:ยจ ยท.ยท ยจ:
โ €โ € โ €โ € โ €โ € โ €โ € โ €โ € โ €โ € โ €โ € `ยท . ๐™š
๐Ÿ‘€3
Forwarded from Birhan Nega
แŠฅแ‹ตแŒˆแ‰ต แˆฒแˆ˜แŒฃ แŠจแ‰ฃแ‹ต แАแŒˆแˆฉ แ‹จแˆšแˆแˆแŒˆแ‹ focus แАแ‹แข pull request review แˆ›แ‹ตแˆจแŒ แˆ‹แ‹ญ แŒŽแ‰ แ‹ แˆ†แАแŠ• แŠขแˆœแ‹ญแˆ แ‰ถแˆŽ แˆ˜แˆ˜แˆˆแˆต แˆ‹แ‹ญ แˆแŠ•แ‰ธแŒˆแˆญ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แข แˆ›แŠ”แŒ…แˆ˜แŠ•แ‰ต แŒ“ แˆฒแˆ แ‹จแŒ€แˆ˜แˆญแАแ‹แŠ• แ‰ถแˆŽ แˆˆแˆ˜แŒจแˆจแˆต แˆตแŠ•แˆฎแŒฅ แ‹จแˆ†แА แАแŒˆแˆญ แ‹ญแˆจแˆณแˆแข

แŠ แˆแŽ แŠ แˆแŽ แˆ˜แ‹ฐแŠ“แ‰ แˆญ แ‹ซแˆตแˆแˆแŒ‹แˆแข แˆ›แ‹ฐแŒ แ‹จแˆแˆˆแŒˆ แˆˆแˆ˜แˆฐแ‰ƒแ‹จแ‰ต แ‹แŒแŒ แˆ˜แˆ†แА แŠ แˆˆแ‰ แ‰ต

แˆ˜แˆแŠซแˆ แ‹จแˆตแˆซ แˆณแˆแŠ•แ‰ต
๐Ÿ‘3
Product of Array Except Self

I learned that instead of multiplying everything each time, we split it into left and right products.

What I understood:

* Left = product of elements before index
* Right = product of elements after index
* Answer = left ร— right


My mistake I first tried brute๐Ÿ˜ญ force instead of thinking in prefix/suffix way

๐Ÿ‘‰ Use left and right products to solve in O(n) time.
โค4