Thanks for such cool tips, shorter version of 2nd problem, btw: ``` const getTable = (row, col) => { let table = []; for (let Ri = 0; Ri < row; Ri++) { let rowResult = []; for (let Ci = 0; Ci < col; Ci++) { rowResult.push(row * (Ci + 1) - (Ci % 2 ? Ri : row - Ri - 1)); } table.push(rowResult); } return table; }; ```
@yahwehagape
3 жыл бұрын
The very first problem is actually explained incorrectly. The reason is not the var i, it’s the let number; which is outside the block scope of the for.
@aaravchandra3082
3 жыл бұрын
Hey Chris, pls explain the answer.
@yahwehagape
3 жыл бұрын
@@aaravchandra3082 My only point is that doesn't have anything to do with `i` being a `var`. If you use `let i = 0` instead, you will produce the same output. What matters if that `number` is declared outside of the `for` loop, so there is only one `number` reference (which gets updated each iteration). However, if you put the `let number` inside the block scope of the `for` loop, then each iteration will create a new reference, which can be held onto by the closure of the function passed to setTimeout. E.g., `for (let i = 0, number; i < 5; i++) {`
@veedawg630
3 жыл бұрын
@@yahwehagape true that
@ramshankarkumar4222
3 жыл бұрын
@@yahwehagape I was looking for this in the comment. Thank you so much Chris to make a clarification on this.
@TheMemin247
2 жыл бұрын
@@yahwehagape She changed var i to let i and it didn't produce the same output, that change fixed it, why?
@Peilerman321
2 жыл бұрын
thanks, that was helpful! just wanted to notice for others who might watch it, that at 7:45 you used the name attribute to reference the input element. instead it must be the id attribute, otherwise it wouldn't be recognized!
@juditturcsanyi6640
3 жыл бұрын
I loved this video, helps a lot! I would enjoy more of these :)
@coding_nomad
3 жыл бұрын
I’m so glad! 😊 I’ll do a part 2 soon!
@raianouar8654
3 жыл бұрын
I love solving programming problems like this
@MC-nb2bh
3 жыл бұрын
Thanks for the help! I have my google interview next Tuesday! Wish me luck!
@coding_nomad
3 жыл бұрын
Good luck! 🙌
@MC-nb2bh
3 жыл бұрын
Are these the questions that they asked you? I know they mix the questions up.
@JBExoticG
3 жыл бұрын
Good luck! You got this easy!!!
@HazemTamimi
3 жыл бұрын
Hey mvcookio, hope you did good. Can I reach out to you to ask few questions? Mine is after 3 days! :D
@MC-nb2bh
3 жыл бұрын
@@HazemTamimi Sure!
@Korutz
2 жыл бұрын
7:55 "for" attribute of the label refers to the the id of the element this label is associated with, rather than the name. Or you can skip the "for" attribute and put the input inside the label.
@dannymartial7997
2 жыл бұрын
I thought I was confident in my front end abilities until the very first question... I can't understand the scope concept and how the first one didn't work.
@berkayyucel8482
3 жыл бұрын
Please make some educational videos about javascript ı am sure ıt wıll be watched.
@Peilerman321
2 жыл бұрын
i got a question regarding LeetCode issues that require knowledge of more complex alogrithms: could there be such questions in a front end interview also? i found that i couldn't solve some harder problems because of lacking knowledge of such algorithms.
@arsalankarimzad1360
2 жыл бұрын
The first question was explained incorrectly, numbers will not print with 1 second interval and all of them will print immediatly after one second beacause of the way javascript work, in order to print with one second interval, promises should be used . !
@nicolaslaverdepena217
3 жыл бұрын
why you use a matrix? thats a really confused part? you don't need a basic case if you just put something like that: if(col%2 === 0){ currentRow.push((rowsInput*col)+1+row) } else { currentRow.push((rowsInput*(col+1))-row) } works! I think the matrix is a little tricky
@coding_nomad
3 жыл бұрын
Hey Nicolas, thanks for sharing it! I just tried your solution, and it works well! It is much shorter and cleaner, but the time complexity stays the same if I'm not mistaken. This video was intended to be an example of "what" to expect, rather than "how" to solve it. There is a very little chance someone will get the exact question.
@addliam
Жыл бұрын
Nice approach on question 2
@huongpham3580
3 жыл бұрын
hello, thank you for making this video. i got a few questions for you tho. how do you practice for your front end interview? how long was your interview and how much time did you give you for the second problem?
@coding_nomad
3 жыл бұрын
Hey, I was preparing for 2-3 weeks by solving problems on Leetcode. I had 45 minutes to solve both problems.
@mohammadhoseinabbasi9993
2 жыл бұрын
On the first question, 2:08 why does it print 5 when `i < 5` should be 4?
@Korutz
2 жыл бұрын
because it starts the count from 0 (var i = 0)
@mohammadhoseinabbasi9993
2 жыл бұрын
@@Korutz yea but it should print 4 cause of (i < 5) no?
@Korutz
2 жыл бұрын
@@mohammadhoseinabbasi9993 No, it increments i after execution, not before, so before i reaches 5 the code in the for loop is executed 5 times
@noahmatheu5164
4 жыл бұрын
Nice solution for the second question.
@bhavyasingh1648
2 жыл бұрын
This is very helpful please keep posting
@hariharankm3401
3 жыл бұрын
Just wondering whether there is Front end specific role at google . When I checked , mostly what I found was Software Engineer roles (SWE I , SWEII etc) . And also heard that they won't mind the programming language , only the thought process and problem solving matters . Did you also had any System design rounds ? I'm also preparing for the Interview , hence so many doubts :D . Nice content btw
@coding_nomad
3 жыл бұрын
Yes, they do have specific Front-End positions. The question I’m solving in the video is for the frontend role. And yes, most likely you’ll get a system design round unless you’re interviewing for an internship or L3 (junior). But you should clarify all of that w/ your recruiter.
@kiransaisivaprasad3830
3 жыл бұрын
I saw this video and i thought to subscribe then i realised i was watching in incognito mode😅. Then i came back to my account and i forgot your KZitem channel name, finally now i got your channel😅😌. This video is great🤟👌🔥
@coding_nomad
3 жыл бұрын
Oh wow! Thank you! I'm glad you were able to find me in the end!
Thanks for the video. New subscriber, a Full Stack Developer in south India!
@coding_nomad
3 жыл бұрын
Thank you for subscribing! 🙏
@progali4550
3 жыл бұрын
Great positive energy🥳😍 thank you🙏🏼 Please, What is the name of the theme in vs code?💜
@krishnamohan9209
3 жыл бұрын
your looking cool as code you have written
@AccessCode101
3 жыл бұрын
Do more interview questions and answers.
@coding_nomad
3 жыл бұрын
Thanks for the suggestion! Will try to do more soon!
@rockysingh7564
3 жыл бұрын
Which company are you doing
@coding_nomad
3 жыл бұрын
I was solving a typical question for the Frontend Engineer’s phone interview with Google.
@user-we9qo4kh2w
3 жыл бұрын
Amazing! What is that note taking app you use?
@coding_nomad
3 жыл бұрын
Lately, I love to use Notion! In the video, I used only Google Docs I believe.
@user-we9qo4kh2w
3 жыл бұрын
@@coding_nomad thank you!!! This is so helpful!! :)
@yuriykvartsyanyy8194
3 жыл бұрын
Thanks a lot he great video and content, very useful! Please, share tips for Google Frontend onsite interview and rounds.
@coding_nomad
3 жыл бұрын
Thanks
@anasryadi8545
3 жыл бұрын
Where is your accent from ?
@coding_nomad
3 жыл бұрын
I’m half Russian half Georgian. :) By the way the chair is from here: www.amazon.com/gp/product/B07MKMPQ29/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
@prajwalpatil8579
Жыл бұрын
@@coding_nomad chair🙄
@sergeyukhlivanov4747
2 жыл бұрын
for second task let grid = new Array(4).fill().map(() => new Array(5).fill(0)), t = true, m = 0 for(let i = 1; i
@prathameshdichwalkar4277
3 жыл бұрын
Plzz mam make complete video on JavaScript script tutorials
@coding_nomad
3 жыл бұрын
Any specific topic you would like me to cover?
@prathameshdichwalkar4277
3 жыл бұрын
@@coding_nomad core concepts of. Java script
@andikakurniawan4188
3 жыл бұрын
I start subscribing this video then
@gagansuneja7029
4 ай бұрын
const rows = 4; const cols = 4; for(let i = 1 ; i
@yashdotrv
3 жыл бұрын
Complicity of n^2, it can be reduced
@Maxim-Veredicto
3 жыл бұрын
Beautiful explanation. Hope in the future you'll have a million subscribers
@coding_nomad
3 жыл бұрын
Thank you! 🙌
@200dav
3 жыл бұрын
Nice. Hello from Armenia
@coding_nomad
3 жыл бұрын
Hi! 👋 I'm half Georgian, so we’re neighbors :)
@200dav
3 жыл бұрын
@@coding_nomad yes, nice people and beautiful country
@amitsahu1350
2 жыл бұрын
Superb
@factskool9635
3 жыл бұрын
U are love♥️
@carval51
3 жыл бұрын
haha I say your video honestly could really miss the first tricky question one 2nd one actually much solvable my formula is more crude though and love how I can see people still make coding mistake
@AccessCode101
3 жыл бұрын
Great video.
@coding_nomad
3 жыл бұрын
Glad you enjoyed it!
@mannix555
Жыл бұрын
function createTable (row, col) { let ans = []; for (let i = 1; i []); for (let i = 0; i < ans.length; i++) { res[r].push(ans[i]); down ? r++ : r--; if (r === row - 1) { down = false; res[r].push(ans[i + 1]); i++; } if (r === 0) { down = true; res[r].push(ans[i + 1]); i++; } } return res; }; add createTable to 'submit' button, row and col get from form values, then it works
@zungatzungatov5317
3 жыл бұрын
💥
@rockysingh7564
3 жыл бұрын
You are better explanation for this
@mrbane2000
Жыл бұрын
Love to listen your cute voice 🤭
@aerowindwalker
2 жыл бұрын
Sweet
@cmdv42
3 жыл бұрын
💯
@marinasar4769
4 жыл бұрын
You are so beautiful 😍
@DuyNguyen-tn3cr
3 жыл бұрын
hello , i am from Viet Nam, it very interesting video and you so very beauty !
@coding_nomad
3 жыл бұрын
Thank you!
@krylovDev
3 жыл бұрын
RUS POWER :)
@mrbane2000
Жыл бұрын
I tried to pratice by myself, and this is what my brain made. At least it works, elm is id of the table function yes(){ let txt; let xIn; let yIn; let num; txt=""; xIn=document.getElementById("xIn").value; yIn=document.getElementById("yIn").value; for(let j=0;j
Пікірлер: 94