HomeЛюди и блогиRelated VideosMore From: TechLead

Mock Google interview (for Software Engineer job) - coding & algorithms tips

5067 ratings | 186905 views
Ex-Google tech lead Patrick Shyu walks you through a technical interview for a Software Engineer job, and explains how to ace that whiteboard coding. The TechLead guides you through an interview session, so you can be as prepared as you can. Good luck! http://instagram.com/patrickshyu/ http://twitter.com/patrickshyu/ For more tech interview tips & tricks, check out TechLead: Season 1 Complete HD available for purchase. https://www.youtube.com/watch?v=_wbKUHBPkh4
Html code for embedding videos on your blog
Text Comments (484)
Zealous Programmer (2 days ago)
Patrick thank you very much for your awesome channel. I have a question for you: Do you think a person 31 years old like me can dream a job at Google in 4 years from with the required skills? I am interested in the age would Google hire someone at 35 years old or it is too late?
James Twining (3 days ago)
while in whole fine in Information a few patronizing comments, if people arent learning the fault lies in leadership. 98% of people are capable of any of this.
Yun Li (3 days ago)
Best one would be stackoverflow? yes, I find my significant other there.
Manisha W (5 days ago)
Just watching this makes me nervous
Alina Kay (4 days ago)
Omg same
shishkov2010 (9 days ago)
Very useful tips. Nice job! Why do you use hash map to track visited cells? It's not the most efficient way to track cells. The best way is to use the boolean matrix or matrix itself (if you are allowed to modify it). Do you want to check that a candidate knows how hashmap works? Stackoverflow is not about iterations but about stack size. By default it can be 1Mb but you can change that.
MrPlaiedes (9 days ago)
You need to relax! I really enjoy your videos; great content and insight. Thank you!
Graeme Gossel (12 days ago)
Question: I went away and did this (having already done floodfill with a recursive DFS so had a bit of a head start) and I ended up using a single hash table to keep track of visited coords, which is passed to the recursive DFS function, which in turn adds all of the contiguous elements of a given colour to that hash table. This allows me to keep track of what i should use for the next starting point, and the area calculated at each DFS is just the difference in the length of the hash table before and after. Admittedly this seems more complicated than it needs to be and can undoubtedly be optimised but my question is this: if i came up with that in a phone interview for this question, would that be considered adequate or horribly suboptimal? Thanks!
Wolfgang Schreurs (13 days ago)
After recently looking at some dungeon generating code, I would probably use a 2d array with an "empty" border around it (the "empty" 0-border makes the bounds checks easier, no null checks and the like). The array would contain integers, but using a mask. Some bits would mark the value and some bits would mark if the node was visited already. Not sure if this would be better or worse than the hash table approach. My guess would be that it would be slightly better, performance-wise.
gmshadowtraders (14 days ago)
What's that painting or artefact on the wall?
Tyler Erickson (16 days ago)
I think using an array instead of a hashmap to keep track of which grid points have been traversed already is more efficient. At the very least I can't see a reason why it would be _less_ efficient. Constant access time, no chance for collisions, and guaranteed minimal space usage. If you could explain why exactly it's a red flag would be great. I understand when a hashmap is useful, but I don't see the necessity here.
sunny Raj (18 days ago)
This video earned you my subscription, and hopefully I ll earn your wisdom.
peakyDicers / ian (20 days ago)
Victor S (21 days ago)
The statement "Array is slower than a hash table" needs a clarification. I assume Patrick meant an array used as a list of visited cells, which needs to be searches each time. That's a disaster that multiplies the complexity by another N. But for this specific task we can use an array of boolean "visited" flags, even a bit array, which is much more efficient than hash map. Not in big-O sense, the complexity stays the same, but the constant cost of accessing it is much lower.
Cosmic Inspector (24 days ago)
Google Tech: "Okay go" Me: "Well, I'm profoundly well versed in skimming over the context page of popular books covering code and I RATTED a scammer... Twice... In one day"
Jared Yes (25 days ago)
Patrick I have a question. As a junior engineer, you mention it's important to show that you're enthusiastic about learning. However you also state that it's a bad idea to ask for the answer to a question you didn't quite know. How can you show your enthusiasm while not directly asking for the answer(s)?
Jared Yes (25 days ago)
TechLead  Good to know, thank you for the response. Great video.
TechLead (25 days ago)
I mean in an interview, it probably isn't the best place to ask basic tech questions that have no place in the evaluation. It's about your, not about the interviewer's knowledge. Once you're on the job, go ahead and ask tons of questions.
Exactuallyable (26 days ago)
I wish I had more thumbs to give you. This was very helpful
Marcus International (27 days ago)
All my thought process and coding were correct. I was not hired. One interviewer just sat without interacting at all?
Biney Kingsley (28 days ago)
Hi Patrick, can I how many Africans were employed as Software Engineers during your time over there?
Jeff Green (28 days ago)
I’ve been a web developer for years, worked for Fortune 500 companies and done many interviews. Not once have I been asked a computer science question since it’s mostly impractical for the job. I’ve also never had to do a whiteboard question. Most interviews can be a series of questions regarding how you would handle a scenario, a coding test where you are set at a computer with a task to do, questions that get you to talk about previous projects and technologies, or just overall tech questions. But the top tech companies like google are known for having off the wall types of interviews. The best interviews is where you talk with the team lead(s) and can demonstrate your knowledge and experience due to the competence of the interviewers. An experienced developer can usually tell if you are in the qualified group by having a tech conversation. Most good interviews revolve around that conversation where you can show you are experienced in the areas they are looking for. There are tests sometimes, but not always. Best thing is to not cram for an interview. You know what you know, little is going to change by the interview time. Just build a project in the platform you will be interviewing for a month or two ahead of time and be able to do the simple things. Solve trivial issues, connect to a dB, code in an OOP style, know some platform and language fundamentals , etc...
Amina Mazhar (1 month ago)
What if you haven't worked on a meaningful/successful project that you can talk about? How else would I talk about myself in a technical aspect?
noxmetus (1 month ago)
Google is obsessed with white board programming. Checking proficiency of white boarding during interviews is similar to checking the speed of typing numbers on keyboard: both have zero relation to proficiency in software engineering.
mihail madzharov (1 month ago)
Does anyone understood the website that he sad at the end for practicing whiteboarding skills ?
TechLead (1 month ago)
DarkEngine (1 month ago)
it is convenient to store same data types in one single variable and later access them using array index
Zack Crenshaw (1 month ago)
How would you recommend keeping track of the different shapes in the grid? I'm thinking maybe you have two lists of points, one is the longest list you have so far, and the other is the list of the current shape you are analyzing? How could you do this with hashtables/arrays?
Sandermatt87 (1 month ago)
I think you can do it with one pass. Basically, you start calculating the size of each connected set of islands and if two islands touch you give one of them the mass of both and the other a negativ mass, with the negativ number indicating where the true mass can be found. Code: def largetsCluster(matrix): #some preliminary checks if(matrix is None): return 0 n=len(matrix) if(n==0): return 0 m=len(matrix[0]) if(m==0): return 0 #stores the size of each connected set of colors, which I will call a cluster in an array. cluster_masses=[] #stores for each fieldto which cluster it belongs. This requires O(n*m) space. As it will become apparent below, we technically you only ever need one row so it could as well be O(m), or even =(min(m,n)) if you are willing to transpose the matrix to save space in case m >> n. cluster_indices=[[-1]*m for _ in range(0,n)] #Now we iterate over the matrix and start identifying all clusters for row in range(0,n): for col in range(0,m): color=matrix[row][col] valid_left=sameColor(matrix,[row,col-1],color) #a helper function defined below valid_top=sameColor(matrix,[row-1,col],color) if(valid_top and valid_left): #both neighbors have the same color index_top=trueCluster(cluster_masses,cluster_index[row-1][col]) #another helper function index_left=trueCluster(cluster_masses,cluster_index[row][col-1]) if(index_left==index_top): #the simple case, both of them already belong to the same cluster cluster_indices[row][col]=index_left cluster_masses[index_left]+=1 else: #fuse both clusters lower_index=min(index_left,index_right) higher_index=max(index_left,index_right) cluster_indices[row][col]=lower_index cluster_masses[lower_index]+=1+cluster_masses[higher_index] #cluster of index1 now has the combined masses cluster_masses[higher_index]=-lower_index #the mass at index2 now indicates where the true cluster mass can be found elif(valid_top): #only the top field has the same color, so add the field to the same cluster index=trueCluster(cluster_masses,cluster_index[row-1][col]) cluster_indices[row][col]=index cluster_masses[index]+=1 elif(valid_left): #same as above for the left field index=trueCluster(cluster_masses,cluster_index[row][col-1]) cluster_indices[row][col]=index cluster_masses[index]+=1 else: A new island/cluster is found cluster_indices[row][col]=len(cluster_masses) cluster_masses.append(1) return max(cluster_masses) def sameColor(matrix,neighbor,color): #returns if the desired field is within bounds and of the same color if(neighbour[0]<0 or neighbour[1]<0): return False if(matrix[neighbour[0]][neighbour[1]]!=color): return False else: return True def trueCluster(arr,index): #returns the true cluster index while(arr[index]<0): index=-arr[index]
Eka Putuasduki (1 month ago)
#lostmyfocus is that amazon cardboard box?
Max Cal (1 month ago)
Techlead did you ever heard that a person from europ got an intern in google?
EvoPortal (1 month ago)
Fuck interviewing, start your own business.
Chris Reyes (1 month ago)
How long where you in the industry until you got good?
Dylan Nguyen (1 month ago)
I have an on-site at Google on Tuesday. 2 of the technical interviews say they will focus on domain.. wtf does focus on domain mean?! lol i'm so fucked.
Nate (1 month ago)
For anyone curious, I created a simple example in C#. It's rather heavily optimized so I could get a 10k^2 grid solved (100 million cells, takes about 3.5 seconds to solve on my pc with dotnetcore 2.1.4) https://gist.github.com/Nate4020/a825c781d681860990cb1113b7aa3178
Singh11225 (1 month ago)
Why not use DP. Seems like a pretty simple problem using that. Or I am a dummy?
BladeAndrade (1 month ago)
Hi Patrick, great video. I recently completed a coding sample for Google University, but I did not pass it. I'm wondering if the failed coding sample will prevent me from applying to Google in the future. Thanks
Prakhar Gandhi (1 month ago)
thanx for hashmap
@TechLead Thank you so much for all the helpful information. I am thoroughly enjoying your channel. I have created an implementation of flood fill here: https://codereview.stackexchange.com/questions/202624/flood-fill-using-unordered-map-which-has-user-defined-type-as-key.
Haxle (1 month ago)
so i have a couple questions. i've been writing some code here and there for a few years now and i even got a degree in comp sci for funsies. during all my time doing this is have not yet had to take an algorithms course nor have i come across any in the wild. im wondering how i can catch up. if i wanted to get a job at google or similar i feel i would need to know about these things to get past the interview but frankly im not even sure what i would have to know. the data structures class i took didnt really get all that in depth and that shows me that every school will most likely teach different algorithms/ concepts based on their own internal curriculum guidelines and id prefer not to be missing out on learning about the algorithms used in interviews like these. i also feel i need to get caught up on my data structures knowledge but i feel like im not really sure where to go for this information. is there a comprehensive resource for data structures and algorithms that is available online or is there a single (or multiple) course(s) i can enroll in at some university that will teach me all of this information without having to get my degree all over again?
Josh Bedo (1 month ago)
Love this thanks for the videos, giving me great ideas for things to look into more.
Jose Villanueva (1 month ago)
does anyone have the actual solution?
superemzone (12 days ago)
I wrote a recursive version: https://repl.it/repls/DimgreyUprightMetrics If you convert it to imperative it would be cool if you reply to this comment
Carlos E. Torchia (1 month ago)
Very useful. Although I'm not applying to Google at this moment in time, I have not gone through the software engineer interview process in 2+ years. You gotta be real tough in these situations as there is a high amount of pressure in the interview room while you are explaining and selling your skills.
Stangil1 (1 month ago)
Why does everyone want to work for google?
BEYOND MANHATTAN (1 month ago)
doing very hard programming in a company big?
Wop wop (1 month ago)
Might as well change the name of this video to 'Technical Interview Bible for Software Engineers' because that is what this video is
noxmetus (1 month ago)
No. It's just a way Google conducts interviews. They are obsessed with white board programming and fall into a trap of thinking their methodologies are the best. The world is bigger and more diverse than Google.
Playlists Like Jobs (2 months ago)
Very important to have a facebook pen during your google interview.
John Smith (2 months ago)
I was interviewed for a Google-X position in their secret X-division for NYC. I told the first Google interviewer that I'm not moving. The Google interviewer kept going on about my several Google interviewers for this position in NYC. I kept telling him, "I ain't moving". Still ignored me... The second Google phone interviewer called me and spoke several minutes, I said, "Move to xxxx and I can work for you. I ain't moving to NYC." Completely ignored me. There was a third interview, but I never showed up... :D
Gregory Stocker (2 months ago)
I never watched your videos because of the one that says Learn programming with one weird trick. I thought it was super cringe and clickbait. But then I actually watched a video of yours and now I’m hooked. You have some A1 content. Keep it up!
harrykjg (2 months ago)
union find?
Patrick Noonan (2 months ago)
Do these coding & algorithm principles apply to undergraduate internship positions?
Chris Broadfoot (1 month ago)
Lancelot Xavier (2 months ago)
Don't be tooooooooo impressive. People get jealous and even threatened. Top people never get hired, just the good enough people get hired.
Anthony Mcqueen (2 months ago)
Programming interviews are beyond stressful. My last one with Blizzard was an all day affair 7hrs. Did the best i could was not selected less than 24hrs later.
Adecade Pongsananta (2 months ago)
The T Leaf
Aristos Georgiou (2 months ago)
You can have a one dimensional array with size n * m filled with zeroes and each time you mark i * m + j cell with 1 to keep track of cells you already visited, making your algorithm work at O(n * m) every time and also avoid infinite recursion.
sallyURL (2 months ago)
Guys I'm a bit confused, can someone explain in details how a hashtable would be used for this problem? I know the basics of how a hashtable works and the complexity etc
letao12 (1 month ago)
You don't need to allocate the whole grid with a hash table. You only need as many hashes as "true" cells in your array. Even performance is debatable given things like CPU caches and paged memory. With a large array your memory is going to be accessed in a sparse pattern which destroys performance.
Nate (1 month ago)
Hashtable uses 5x as much memory and is slower versus array. Let's start with a jagged array. You only need 1 byte for each cell - 7 bits for color, 1 bit for if the cell has been visited. This can be micro optimized down to 1 byte for every 2 cells, but for simplicity let's use 1 byte per cell. With a hashtable, you are allocating 4 bytes for each hash, and I assume you're also using some sort of grid too, so add an extra byte for each cell. So memory-wise, 1 byte vs 5 bytes per cell. For performance - with a jagged array all you're doing is allocating the arrays then setting values for each cell. With a hashtable, you're allocating a grid, setting values for each grid cell, then you're adding potentially millions of hashes to the hashtable. You'll be calculating the hashes of 2 ints (x, y) then adding to the hashtable. This is significantly slower than 2 loops in jagged array. If you have an implementation that I haven't thought of, feel free to share
letao12 (1 month ago)
Depends. If the grid is large and the expected number of connected cells is small, then array will take much more memory than necessary. Of course a direct array lookup is faster than hashtable lookup. It's a time/memory tradeoff. Remember you also need to clear the entire bool array when starting a new search. That takes time too compared to allocating a new hash table.
Nate (1 month ago)
You should NOT use a hashtable for this. I ran tests and significantly increased performance / reduced memory usage by simply utilizing a 2d array with tuple<color, bool>. When visiting a cell, skip it if bool is true, else calculate it and then mark the cell's bool as true.
letao12 (1 month ago)
Every time you visit a cell you would check if hashTable contains the cell. If it doesn't then do work on that cell (compare colors, recursively visit neighbors, etc.) and add the cell to the hashTable to track the fact that you've visited. If the hashTable already contains the cell then don't repeat the same work again.
Joel Carter (2 months ago)
I'm currently preparing for the phone interview. I've been searching all day for tips and study material
western meadow (2 months ago)
Thanks Tech Lead! Going in for my on-site interview tomorrow (fingers crossed)
We are 2nd connections on linked in.
TEE LEE (2 months ago)
hi we are similar to each other with teelee
Brandon Pollack (2 months ago)
just found you and your humor is subtle and hilarious
Jose Diola (2 months ago)
google interviewer: how do you traverse tree... me: can i use google?
Roland Jacobsson (2 months ago)
I dont understand why using a hashmap is such a great idea compared to a simple 2d-array (so inguess i wouldnt be hired). Is the idea that you would hash different scanned regions rather than saving the individual points that were visited? Are you sure the hashmap wouldnt end up taking more space than the 2d-array itself? What purpose exactly will the hashmap serve (other than beeing fancy)?
Rodney (2 months ago)
Best interview video I have ever seen :)
Chen Luo (2 months ago)
The pen is a facebook one, LOL
Awakened Sleeper (2 months ago)
if you needed this for fast visual recognition of the largest colour section - a specifically designed and trained neural network would be the hardest to develop, but the fastest to run - also f# running CUDA kernels designed for the job - or stick with the kindergarten solution of a # table I guess.
Free Music (2 months ago)
I thought I'd never see a Japanese man drink bagged tea
Mike100 (2 months ago)
You do not need a hash table to achieve linear time. All you have to do is to find the next DFS starting point by looking at the "visited" flag in a linear manner. Once you have reached the end of the grid, everything is visited and you are done.
Lets be human (2 months ago)
Quick question: Is it fine to list an incomplete (read it as "in progress") side project in resume? How about stalled side projects? Overall, I tried to do 3 side projects in span of 2 years, out of which one is live to showcase, one stalled and another in progress. Long question: I have been working on my side project (which is kinda of Quora but for different domain). I have been doing it solely for past 8+ months. Its not complete yet , so the website is not open for public. I have no plans to make the code public in Github, as I have plans to make it as my startup(but right now, I have to land on another job due to my visa issues). Shall I list it in my resume? Another side project, I stalled it because, mid way I realized I have to buy at least 1K VoIP phone numbers(where each phone number is 1$/month). Shall I list this too? Please help.
David Campos Rodríguez (2 months ago)
I am graduating in computer engineering by the Universidade de Santiago de Compostela (studied also a year in the Universitat Politécnica de Catalunya) and wow... I expected a more-complex problem from Google. I guess anybody graduated can solve that in an efficient way in just a couple of minutes (at least in the universities I studied, and they are not very special ones, just normal) because it is in fact a really familiar problem after these kind of studies. :/ I mean... it is a nice problem to check lots of different things but, Idk, with the fame Google has I expected... something really crazy. Very good video, btw, so nice to see everything you say sounds very well thought and solid and you give good advices.
sh Y (2 months ago)
lol'ed at "was it real?"
deckard163 (2 months ago)
your statement about Hashtables being faster than arrays is just wrong. First and foremost, when people looked at John Carmack's DOOM code people(peons, little people) critized that Carmack used arrays instead of hashtables. It goes without saying, John Carmack is a GOD on Earth compared to any supposed "senior" software "engineer" at Google, or Microsoft. First, to create the keys, and the hashtable is CPU intensive. Secondly hashtables just don't make any sense for certain tasks, let's say it is dynamic set of data such as a "grid"(a playlist) of videos in video player, every time the user deletes a video, inserts a video, or moves a group of videos (drag and drop) from one part of the list(grid) to the other place in the grid, Not only does each and every video have it's unique ID, but it also has it's particular (specific and unique) location in the list(when it should be played) . The hashtable makes not sense whatsoever in this case. Also lists or sets of data that have to be reiterated, are conducive to arrays and not to hastables. The hashtable main advantage is "picking out" one particular entrance in the entire data set, but the hashtable is not conducive to reiteration. What is more, modern CPUs and hardware caches are specifically optimized to search arrays, rendering "software" optimizations such as hashtables almost redundant nowadays. In fact the index of the array is usually stored in a register of the CPU(even faster than the hardware cache) and it can search a list of entrances of millions or billions almost instantaneously. In fact I did benchmark testing searching through arrays with almost a billion entrances, and the computer registered 0 milliseconds for the function(meaning is was in the microseconds, or nanoseconds). Of course it would have been better to measure the operation in nanoseconds, but for my particular testing I did not need more accuracy, and it was only for curiosity. In short, a hashtable really ONLY is more optimal IF: 1) you have a static set of data, meaning it will not be constantly changing. 2) you have an extraordinarily long list of data. 3) you always need to find one particular item from the data set 4) you will not be needing to reiterate over the entire data set for some reason. Otherwise, for more complex datasets, such as the example of a playlist of videos, in which the video not only has a unique ID, but also has unique user defined position in the list(from drag and drop,etc.) then the array is a much superior option. Much cleaner, much simpler, uses much less memory, uses much less CPU(except in the case of picking out one particular item from the data set, and even then the hardware is optimized for it). Also, your particular example, of a double array grid, a hashtable would HINDER the performance and not help it! Because each square can be located AND IDENTIFIED by it's x,y axis(it's 2 indexes) and thus using an array it would be possible to locate any position INSTANTLY by it's unique identifiers(it's x and y), and a hashtable makes ZERO sense and in fact would be the wrong choice!
deckard163 (2 months ago)
TechLead - Cool!
TechLead (2 months ago)
lol nice. I think if you could give me this explanation after I told you "arrays are stupid," I'd allow it.
I watch your videos, but I'm not a software engineer, compared to most I'm a crappy coder, but I find them entertaining anyway.
Andrea Cazzaniga (2 months ago)
never heard any of that hash stuff and so on. I would make a grid and dissolve all the shared borders among similar neighbours and count the ones left. add a check if you got a doughnut or not. Pretty sure it can work, somehow. am I hired ?
Vasilis Margonis (2 months ago)
How about this solution: (Correct me if im wrong) 1) Represent the grid as a colored graph: one colored node for every square of the grid. One edge for every pair of adjacent squares. Use adjacency lists to create the graph. 2) from the graph you created, delete all edges whose endpoints have different colores. This is done in O(n) time since the relationship between the graphs nodes and edges is linear. 3) Run a DFS to find the connected component with the largest number of nodes. Again in linear time. Assuming that the grid is already given in the input as a graph via adjacency lists, this algorithm runs in O(n) time and O(1) space. ** Step 2 is redundant since we can ignore the "bad" edges in the first step and dont add them in the graph.
Alan Alban (2 months ago)
So if I found this relatively friendly, since this is Google, does it mean other companies wouldn't be as tough to interview with?
Ivan Bozhytskyi (2 months ago)
Why do you need to use deep search for that task? Maybe I didn't understand the question, cause I solved it with O(m*n) complexity just checking every neighbour for cells in double loop and adding them to the area or merging areas if colors are similar.
Matthew G. Garcia (3 months ago)
Is that a D800 on your table?
Matthew G. Garcia (3 months ago)
Nice! I've been using the D5000 for years! I'm thinking of getting a D850. Or I might get a D800 on the cheap if I can find one in good shape. I'm contemplating the pros and cons of price vs features lol. They (D800) are still good cameras..
TechLead (3 months ago)
yep! good'ole d800.
Donni Wise (3 months ago)
You should write code in JavaScript or Java to show how this question is coded on whiteboard or computer.
rohan pithadiya (3 months ago)
Using Array instead of Hashtable for this Question is RED flag !! ? Sorry i am not able to get it.. can you plz explain or redirect me to some help !! If i know 2d array indexes, looking for a value at that place only, how that can be slower than hash?
Morris Kal B (3 months ago)
Lol as soon as I saw the question I thought depth first search 😂
Zadius895 (3 months ago)
hey! i really enjoyed the video. recruiting season is creeping up really quickly so i'm starting to get a bit nervous/more serious about algorithm practice. i don't think this would benefit me much but something that i think people would like to see is maybe a problem of the week type of thing where you just go through a question and explain all the thought process behind the question just like you did in this video. i thought i would get this question since i knew how to solve it but there are definitely several subtleties that you pointed out while explaining the approach and solution to this question that i missed. thanks for sharing the question and best of luck with your channel
Inaccessible Cardinal (3 months ago)
I don't like leading interviews, but dude, read the resume. Bloody hell. It takes 5 minutes. Read it.
naresh guggilla (3 months ago)
Techlead, can you please make a video about what you think are the best practices when tying apis together(3:29) when building a service?
Soumya Sengupta (3 months ago)
Amazing video. The concern about using a iterative approach while considering the stack space for recursion.was amazing. Is not the time complexity 4*(n^2) where the matrix is n×n. As each element may be accessed to check if it has been accessed before or not at max 4 (i-1,j-1 && i-1,j && i-1, j+1 && i,j-1) times as an element can only be checked by the elements which appear in the row and column before it.
Soumya Sengupta (3 months ago)
Please correct me if i am wrong with the abovr timr complexity.
MAD FOR IT (3 months ago)
hey, whats the difference between Software Engineer and Software Developer ? I am highly confused. Somebody explain me in details.
PhasmatisApparatus (3 months ago)
Hi Patrick, If you were a tech lead again, but not at Google, and were free to craft the interview process however you wished, would you implement the Google interview process exactly, or would you change some things? Thanks in advance.
Helin Wang (3 months ago)
Thanks for the video. A solution in Go: https://play.golang.org/p/j3zYN3mfM0A in case anyone is interested.
Kirill Berezin (3 months ago)
Disclaimer: im so f tired after deadline. But about this test task, why would you use threes, nodes, etc? Depth first really? Just count slice by slice, done. Why do you need 'am i been there' flags, ever. I just dont get it. You have structured field. https://pastebin.com/WgkESnic For sake of understanding it returning number, but it easily could return pointer to location. There is no comments because its just youtube. But what it actually does - counts connection length for neighbors on each line. Then checks if that exceeds what comes from previous line. Writes max in this line cell. Done. It always checks right and up neighbor only. Time: O(W,H) [more precisely is O(H * (2W - 1))] Memory: O(W) [more precisely is O(2W)]] I suppose there is a way for significant speedup if you split lines by chunks aligned with cache lines, utilize mem preload and write stats in one array (discarding previous data), so it should be O(H*W) with O(W) memory. But who cares it should be fast enough already.
Kirill Berezin (3 months ago)
Damn i just watched whole video again. Wtf. Explain somebody to me please.
Forty-six and Two (3 months ago)
Where do I even start?
Lucky Mallet (3 months ago)
did you have an answer which will utilize a variation of unionfind?
Kyrylo Kalashnikov (3 months ago)
Could you provide the solution to the grid problem with python?
superemzone (12 days ago)
Hi, I think this is apt for the recursive version of the solution: https://repl.it/repls/DimgreyUprightMetrics
NuEnque (3 months ago)
What are your chances of working at Google without a college degree?
TechLead (3 months ago)
depends what else you've accomplished... ask a recruiter?
Michael Nicholson (3 months ago)
Really enjoy your vids. We seem have a similar, pragmatic approach to software development, people management and life outlook. Your calm and honestly sometimes rambling approach to these vids, along with the touch of unrecognized humor also keep me coming back. Cheers!
Stew (3 months ago)
That's a pretty tough question. Backtracking algorithms is something I haven't fully covered in detail yet. Only divide and conquer and greedy algorithms.
Caio Novaes (3 months ago)
Thanks TechLead! =]
Abhishek Duggal (3 months ago)
Any website from where I can prepare for the written test before interview. And also practice for Group Discussion ❓
Alex Zoye (3 months ago)
Why you using slow motion at 8:20? haha
Albert Wang (3 months ago)
If I feel better with you, I will hire you, otherwise, I will find a perfect excuse for it.
Bogdan Transcendentov (3 months ago)
I'm not a software engineer, but this sounds really simple. I mean, yes, I do love and know data structures, but I'm practically a noob without real experience in software engineering. And yet this sounds quite trivial. I wonder if people use things like ternaries and regex just to save time writing code on whiteboards. I know people try to avoid them in code just cause they may be hard to read for new peeps, but it is a lot quicker to write. Should be good for a quick real-time test.
Minh-Tuan Ta (3 months ago)
I've heard there's also a design interview in the onsite. Could you talk a little about how the design interview goes?
MrLangam (3 months ago)
Do you play computer games?
leafwiz83 (3 months ago)
Would not want to work at a company that is known to harass conservative thinkers
Tommy Sg (3 months ago)
would you ask this kind of questions to experienced developers/engineers?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.