FAANG Level Mock Software Engineer Interview (JavaScript)

  Рет қаралды 39,071

DonTheDeveloper

DonTheDeveloper

Күн бұрын

Пікірлер: 45
@varuntyagi6116
@varuntyagi6116 2 жыл бұрын
That was a really nice interview. Shout out to Daniel for keeping it friendly and lighthearted the whole time. I've been in interviews where the interviewer was very rigid and it in-turn made me very nervous.
@pmulard
@pmulard 2 жыл бұрын
Just want to give a shout out to Daniel, who kept the interview lighthearted and fun :) I'm sure it goes a long way in easing the interviewee's anxiety and bringing out the best in them.
@DonTheDeveloper
@DonTheDeveloper 2 жыл бұрын
Daniel is a goofy guy. I would have enjoyed being interviewed by him.
@ozzyfromspace
@ozzyfromspace 2 жыл бұрын
This was actually a really good interview! Well done Brian!
@jscul
@jscul 2 жыл бұрын
It's funny this interview. At 10:25, the interviewer is actually wrong, you don't need quotes in JS. You can just do {a: 1, b: 2}. Python is the version where you'd need quotes. I'd probably comment on that and explain that in JS if you want to name something a key using a variable you would do {[a]: 1, [b]: 2}.
@davidwoods1337
@davidwoods1337 2 жыл бұрын
He was probably thinking of JSON, which has mandatory quotes
@sehoonah7756
@sehoonah7756 Жыл бұрын
I was thinking this very same thing
@om3galul989
@om3galul989 2 жыл бұрын
Thanks for the awesome interview! I was thinking, create trie out of words --> create freq map --> evaluate every word in the trie while using backtracking to undo modifications to the freq map. The efficiency here is that you don't recreate the freq map for each word + stopping early and not repeating work when evaluating words with same prefixes like 'dog' and 'dogs' etc.. run time: O(2D + T ---> D + T) D is number of letters in trie, T number of tiles in freq map
@danieltomko4434
@danieltomko4434 2 жыл бұрын
That's exactly right: preprocess. But not a TRIE for this problem. It doesn't actually help because you're not searching for a specific word, you're searching for words that can be MADE using the tiles.
@Alddun
@Alddun 2 жыл бұрын
Lets goo Brian!!!
@ronpaek100
@ronpaek100 2 жыл бұрын
Let’s go Brain!! 🙌
@austinlawan3289
@austinlawan3289 Ай бұрын
Thank you for these sessions guys. They very very helpful.
@lailbeeb
@lailbeeb 2 жыл бұрын
Daniel was awesome. It's better to have lighthearted goofy interviewer than stone faced interviewer who says nothing, I hate those interviews.
@laszloekovacs
@laszloekovacs Жыл бұрын
I'm way too bad as a programmer but I managed to solve this with map, reduce. One of my proudest moments.
@austinlawan3289
@austinlawan3289 Ай бұрын
I was looking for this very comment. I was able to easily solve this with map as well.
@arthurd4012
@arthurd4012 2 жыл бұрын
Nice job Brian!
@SpinozicTroll
@SpinozicTroll 2 жыл бұрын
Wow what an amazing interview, thank you so much for your content.
@trignal
@trignal Жыл бұрын
It's impossible to read the question. Can someone please post it here?
@mrawesome1821
@mrawesome1821 2 жыл бұрын
Hey Don, Would you be willing to do interviews with some people are aspiring developers? I think it would be beneficial to interview those who are working to becoming a developer. LOVE THE VIDEOS!
@DonTheDeveloper
@DonTheDeveloper 2 жыл бұрын
I'm definitely down to bring on aspiring developers for episodes. I believe I've created a post in the past inviting people, but no one followed through with it. Everyone wants to see episodes like that, but no one wants to volunteer.
@mrawesome1821
@mrawesome1821 2 жыл бұрын
@@DonTheDeveloper I’m open to joining the conversation. My background is a little different which could make a discussion interesting.
@DonTheDeveloper
@DonTheDeveloper 2 жыл бұрын
@@mrawesome1821 Sounds good. Go ahead and email me if you're interested in coming onto the podcast. You can find my email address on the About page.
@pedroreyes5478
@pedroreyes5478 2 жыл бұрын
Great interview and video! I felt like mentioning the optimization for the game of scrabble (wordbook wont change, can be fully processed) is kind of out of the scope of the problem at hand.
@qaqiaq4200
@qaqiaq4200 11 ай бұрын
Feel like the first answer was over engineered/hard to read. Here is what I came up with: const scoreWord = (word, tiles) => { let result = 0 for (const char of word) { if (tiles.includes(char)) { result += alphabet[char] tiles = tiles.replace(char, '') } else if (tiles.includes('_')) { tiles = tiles.replace('_', '') } else { return 0 } } return result } and for second question: const scoreWords = (words, tiles) => { let score = 0 let bestWord = '' for (const word of words) { let tempTiles = tiles let tempScore = 0 if (word.length > tiles.length) { return } for (const char of word) { if (tempTiles.includes(char)) { tempScore += alphabet[char] tempTiles = tempTiles.replace(char, '') } else if (tempTiles.includes('_')) { tempTiles = tempTiles.replace('_', '') } else { continue } if (tempScore > score) { score = tempScore bestWord = word } } } return [score, bestWord.length > 0 ? bestWord : null] } console.log(scoreWords(['cat', 'dog', 'foo'], 'cado_f')) //[5, "foo"]
@allensun6329
@allensun6329 2 жыл бұрын
And leetcode reference of the second problem?
@jjescandor191
@jjescandor191 2 жыл бұрын
Here's my solution to the second problem: def max_score(list_str, tiles): max = 0 word = "" for str in list_str: total = scorer(str, tiles) if total > max: max = total word = str return [max, word] print(max_score(["cat", "dog", "dogs", ], "tmac"))
@MocBocUS
@MocBocUS Жыл бұрын
yeah but your time complexity sucks
@alexjosesilvati
@alexjosesilvati Жыл бұрын
Very good interview ingles! Is helping the interview...
@JJ-ps3vb
@JJ-ps3vb 2 жыл бұрын
Isn't the time complexity of Q2 the same as checking the score for every word? He's just pruning the search but not improving the time complexity.
@garkman5000
@garkman5000 2 жыл бұрын
Yep. Worst case time complexity remains the same but in real world cases this is an improvement. I do agree, it's kind of over engineering to address that in the first code through. Something to mentioning when asked, how to improve, IMO
@陈藏
@陈藏 Жыл бұрын
It will return early in the iteration of words, if the largest possible word has been found, right? Constructing words takes some time, but querying the maximum value saves time. It's even better if, in a real project, you need to query different tiles @@garkman5000
@mshawn3832
@mshawn3832 Жыл бұрын
I didn't understood the first question only can anyone explain it to me
@陈藏
@陈藏 Жыл бұрын
Is it possible to get the word using the letters in the tiles, each letter can only be used once, underscore can represent any letter. Each letter has a value. Return the value of the word(each letter plus)
@ericnail1
@ericnail1 11 ай бұрын
The only thing that bothered me was that he was correct about copying the letters, all object keys are inherently strings and those keys were all valid var names in JavaScript. No quotes needed. Really cool interviewer, though. A+
@emmanuelU17
@emmanuelU17 2 жыл бұрын
Zooming in would have been nice
@阳蔡
@阳蔡 2 жыл бұрын
SamWell in GOT?
@DonTheDeveloper
@DonTheDeveloper 2 жыл бұрын
I was nothing at all, and when you're nothing at all, there's no more reason to be afraid.
@kevinnguyen1330
@kevinnguyen1330 2 жыл бұрын
Great practice interview and great job to Brian! Was a interesting problem, as I also never played Scrabble. Was also fun to try it myself and ended up getting a different solution. Thanks for sharing! const dictPoints = { a: 1, b: 3, c: 3, d: 2, e: 1, f: 4, g: 2, h: 4, i: 1, j: 8, k: 5, l: 1, m: 3, n: 1, o: 1, p: 3, q: 10, r: 1, s: 1, t: 1, u: 1, v: 4, w: 4, x: 8, y: 4, z: 10, _: 0, }; function getDictionary(object, key) { let result = object[key]; return result; } function checkMap(tiles) { let map = {}; for (let i = 0; i < tiles.length; i++) { if (!getDictionary(map, tiles[i])) { map[tiles[i]] = 1; } else { map[tiles[i]] += 1; } } return map; } function calculateWord2(array, tiles) { sum = 0; bestPoints = {}; map = checkMap(tiles); array.forEach((string) => { sum = 0; for (let i = 0; i < string.length; i++) { if (getDictionary(map, string[i])) { sum += getDictionary(dictPoints, string[i]); map[string[i]] -= getDictionary(map, string[i]) - 1; } bestPoints[string] = sum; } }); return bestPoints; } console.log(calculateWord2(["cat", "dog", "test"], "tke_skdac"));
@or2594
@or2594 2 жыл бұрын
Well i would like to try (:
@emmanuellmiqueletti7029
@emmanuellmiqueletti7029 Жыл бұрын
Actually using a Trie tree in this problem would increase the complexity so much. I like the map approach.
@hai-quanzhang7335
@hai-quanzhang7335 2 жыл бұрын
Nice job
@dinahlizett
@dinahlizett Жыл бұрын
I am supposed to have an interview in a couple of weeks, after seeing this I should just cancel it and save myself and my interviewer time.
@RedOctober46
@RedOctober46 Жыл бұрын
Live tech interviews make me cringe. I am forced to give them for interviews at my job and I hate them every time. Better options are to give the candidate a small project that might take a couple days or a weekend to complete. Also, can do it proctored to safeguard against any cheating (thanks to covid tons of services now exist). This would be a more real-life demo of their ability. Also, the dedication to complete it would scare off most, less dedicated people immediately. I know GitLab does something like this already.
@ifuloseurbad
@ifuloseurbad 2 жыл бұрын
FIRST
Front End Mock Technical Interview | JavaScript, CSS, React, and Algorithms
1:33:39
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Entry-level JavaScript Mock Interview
1:20:23
DonTheDeveloper
Рет қаралды 16 М.
What Hiring Managers Look For in a Junior Developer
1:16:35
DonTheDeveloper
Рет қаралды 44 М.
Mock Technical Interview - Javascript Developer Entry Level
1:36:22
Tech with Nader
Рет қаралды 509 М.
Google Coding Interview With A Facebook Software Engineer
49:59
Clément Mihailescu
Рет қаралды 954 М.
React Coding Interview Ft. Clément Mihailescu
47:08
Conner Ardman
Рет қаралды 141 М.
Mid-Level JavaScript Interview
1:19:33
Justin Lawrence
Рет қаралды 7 М.
JavaScript Mock Interview 2024 - Live Coding
17:48
theSeniorDev
Рет қаралды 2,8 М.
Software Engineering Job Interview - Full Mock Interview
1:14:29
freeCodeCamp.org
Рет қаралды 1,6 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН