I went to the source for this one. I went directly to one of the hololens developers employed by Microsoft. I checked out their github and luckily they just updated their github to a new version of QR detection. IDK how I got so lucky.
I felt like this dog.
I was so so happy!!
Anyways integrating this new qr detection was so easy. All the information was right in front of me.
All of the unity versions, project settings, Nuget packages were all updated. Definition of awesome seriously.
An unorthodox day. Both of the problems I completed today were along the lines of real world problems. This made it a lot more entertaining to solve. The first problem I completed was executed perfectly. I actually did an extra step that was not needed because I didn't read the problem rules correctly. Although the execution was perfect, the results were not. Not all test cases passed and I was too lazy to fix the bug, but my code was almost identical to the ones as a the solution.
Some things to REMEMBER for this problem:
- the order of enumerate is index,value. Thats the order when you are for looping.
- Also there are such things as sortedmaps in python. It gets instantiated by Sortedmap(). There are some special methods attatched to this data structure to make it work, but overalll.... It's super useful.
The second problem I faced was a monster. The problem wanted a FAANG level algorithm out of me. The correct algorithm to solving the problem was Union Find. This uses groups, merging, representatives, parents. Its a complex one. Not sure if any internships interviews would ask for it.... but yk. It doesn't hurt to get familiar with it.
Dis da video I uzed to get familiyar
Also the nxt video is how to solve the second leetcode monster question I was talking about..
I'm back from a long break away from leetcode. Long meaning 1 week and a half. So really not that long. But it feels long. I wasn't too rusty, but getting into the rhythm is hard. The first problem went well. I came up with a O(n) time and O(n) space solution. The most optimized was O(1) for space and same time complexity. If an interviewer were to ask me to optimize my problem, I think I could have handled it for sure. The problem was about finding the product sum of every element of the array and populating a result array with that value without the included product of the element at that position. (Product of Array Except Self) With problems that need the values from every other element, its nice to think about prefixes and post fixes. So basically iterating through the array forward once and backward once. Kind of a neat trick. I did well on it.
The second one tho...
Pretty complicated. I was able to solve every part of the problem besides the hardest part which is something that is often in a lot of leetcode problems. This component is the idea of a result array to not have duplicates. This means that the way to solve the leetcode has to be done in a special way where it inherently doesn't allow for duplicates.
I should draw a little more. Decision trees help solve A LOT of these medium problems. Also, neetcode is the GOAT. He's great. he should work at amazon and google at the same time. he can handle it.
Here was the drawing I did...
The second one in hindsight is super hard however if its the first time seeing a problem like that. I think an interviewer would appreciate my approach.
One weird thing did happen while I was coding. My list/array skills were failing me. the code was producing a list that was not even close to the thing I wanted. I couldn't find the bug, I hope I run into the issue again to fix it.
P.S. when passing down a variable in python. REMEMBER THAT ITS PASSED BY REFERENCE. SO BECAREFUL WHEN THE SAME VARIABLE IS USED IN MULTIPLE CALLS. USE .copy() method if you have to.
I think I'm getting really close to finishing up my personal website. SOO SOO close. I finished up the final section of my website. It goes at the bottom, a little cheeky contact section.
Check it out.
It was really difficult for me to get the vibe of this section to go along with the rest of the website. I also added some more info to the "get to know me" part of the website. I finished with majority of the website. I just need to add info and some pictures/videos.
But first, I have to make sure my personal projects work well LOL. I haven't touched them in ages.