Intel Coding Interview Question - Generate Parentheses - Leetcode 22

preview_player
Показать описание
FAANG Coding Interviews / Data Structures and Algorithms / Leetcode
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

Minor correction - you have the problem name as "Valid Parentheses" in the video description, but that would be the Easy difficulty problem #20. This is Generate Parentheses.

nigh_anxiety
Автор

What I like in this type of problems is that you can discuss tradeoff based on the hypothetical hardware requirements that would be imposed in a real life task.

For instance this problem can be done without a stack, this improve performance by a lot, but will require more memory allocation. Both solutions sharing same time and space complexity.

zangdaarrmortpartout
Автор

When I came for internship at Intel there were no such thing as algorithmic interviews. I was asked to write a function which implements an addition of two arrays in C. Later we discussed various optimisation techniques, ie how this code could be vectorized, memory alignment and so on. Nowadays interview are just shit.

grifon
Автор

I wish I could give this video more than one like. It's that good!

MyCodingDiary
Автор

Your videos are really easying stress around interview coding challenges.

venkatakiritimunganuru
Автор

Is the return suppose to be outside the function?

aNoobLikeSaibot
Автор

If intel is worried about nesting parentheses then it is time to sell INTC.

daviddelaney
Автор

With mathematics can we achieve this with O(n) and answer is Catalan number. Just writing factorial fumction in O(n), though that may be cheating😅

anmolsinha
Автор

Actually its a nice backtracking algorithm. Really streight forward.

TFShows
Автор

I guess you can also use stacks concept to check for well formed parentheses

Xanchs
Автор

Excellent, through yet concise explanation. Sir, I am trying to study Data Structures and Algos, I am an Electronics Enng myself, which source or book would you recommend ?

Автор

Sol array is not necessary instead you can use path + “)” or path + “(“ depending on the condition

shreehari
Автор

Wow I was exactly I asked this in my first tech round at Intel

aiyushbedi
Автор

this was really well explained! thanks

ninjaasmoke
Автор

My brain isn't braining the question

LePhenixGD
Автор

Would be nice if you actually explain this slowly so normal humans can understand and then actually progress.

SuspiciousAlertness