Daily Algo Boost | Challenge πŸ”₯
93 subscribers
54 photos
2 files
27 links
Sharpen your coding skills with daily LeetCode challenges and algorithm lessons.

(Solve leetcode problems every day)

#challenge πŸ”₯
Download Telegram
#day3

Day: 07.03.2025

Problems:

1. Remove Element

2. Majority Element

3. Design HashSet



P.s) Bad yechimlar
πŸ‘2πŸ”₯2
Forwarded from Saocodes
I have failed Google coding interview today, let's save it here.

I applied to google jobs from careers page, and hr reached out to me. We had a call and he gave me a mock google interview. Mock interview was fine, got some positive feedback, but as usual couldn't solve the problem. Then a real assesment interview started and I failed from the first problem below:



The problem:
input is a list of ranges
[[2,4],[4,5],[4,5]]

output - all possible numbers by concatinating numbers from ranges
244, 245, ..., 344

to be clear:
Input:
A list of ranges, where each range is represented as a 2-element array [start, end] (inclusive).
Example: [[2, 4], [4, 5], [4, 5]]

Output:
An array of strings. Each string represents a number formed by picking one digit from each range in the given order.
Example Output for above input:
["244", "245", "254", "255", "344", "345", "354", "355", "444", "445", "454", "455"]



The solution I wrote:
const findNumbers = (ranges) =>{
let rangeLength = ranges.length;

const buildCombination(arr, r, path){
let res = []
if(r === rangeLength){
res.push(path)
return res
}

for(let i=arr[0]; i<= arr[arr.length-1]; i++){
path = ${path}${i}
buildCombination(ranges[r+1], r+1, path)

}
}

return buildCombination(ranges[0], 0, '')

}
⚑1πŸ‘1πŸ”₯1
List of steps: πŸš€

1) 42.uz & Grokking Algorithms Book
2) YouTube PlayList
3) AlgoExpert & SystemsExpert Videos & Algorithms Introduction
4) neetcode.io 250 & LeetCode 75

πŸ’» GitHub
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯4πŸ‘2⚑1
Forwarded from @Rustam-Z⚑️
πŸ€” Algoritmlarni Nimadan O'rganishni Boshlashni Bilmaganlar Uchun

Shu yerdan boshlanglar β€” https://neetcode.io/practice?tab=neetcode250. Hammasi bitta joyda.

Zoβ€˜r resurs, zoβ€˜r darslik topishda emas sir β€” balki nimadandir boshlashda, va ichingizda qiziqish yondirishda. 

1 - 2 misol yechsangiz har kuni, 5 oyda tugatasiz. Har kuni 1 - 2 soatdan misollar yechishingiz kerak. Tugatasiz, va Google, Meta, Amazon, Yandex, ... kompaniyalarga ishga kirasiz, va ko'p pul qilib, katta loyihalarda foydali experience olasiz.

Just be ready when you get your chance and don't miss it.

@cracking_maang
πŸ‘3⚑1
Forwarded from @Rustam-Z⚑️
How to Approach Challenging LeetCode Medium-Level Problems?

When I started, I would spend 2 hours solving a single problem. That's okay.

While solving the problem, understand the question. If you get stuck, imagine helper functions or solve a simpler version by removing some constraints.

Article: https://rustam-z.notion.site/How-to-approach-solving-algorithmic-questions-if-you-stuck-2521ece53065800ca7ddf5c4020336a4

@cracking_maang
⚑1πŸ‘1πŸ”₯1
Erta tongdan miyaga uyg'otib olish zo'r yo'li.

- mask bitwise’dagi ajoyib yechim yangilik bo’ldi va Graph'lar bilan ishlashda 0 bilim edi.

42Algothon zo'r bo’ldi)
πŸ‘2⚑1πŸ”₯1