HackerRank Find Merge Point Of Two Lists Solution Explained - Java

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

this is just brilliant, it took me two days to realise what my mistake was, when i get that clear than this solution just clicks.

foreducation
Автор

No need for me to check anothera video Nick...Your way of explanation is really awesome...I undertood each and every line of code and concept...Thanks a lot for From India

zenshyam
Автор

You are crazy man! Awesome video. By the end of your code, I was laughing like hell... cause my code is a bit complex, more length and failing for one test case, while your code is very intuitive and simple!

g.naveenkumar
Автор

will the below solution work?
use two loops (inner, outer)when first equals to second then we just return the value.

rudranarayandash
Автор

Awesome explanation of the problem... Initial graph given in problem was confusing.
BTW: I work these problems out in Java 8 and I have never gotten the code auto-complete to work.
For some reason I'm not even getting the Setting option when I click on the three dot menu.
I'm on MacOS Catalina using Chrome... I have tried with Safari as well.
I see the autocomplete in your browser works like a charm.

mrcortadito
Автор

your channel is soo underrated man! awesome work!

snehan
Автор

What would you say is the runtime of the algorithm?

Nickel
Автор

Will this algo work for following scenario ?
1. both list contains some data which are common but not at merge points :
l1 : 1, 2, 3, 4, 5
l2: 7, 2, 9, 4, 5
2. what if there are duplicates in both list"
l1: 1, 2, 3, 4, 3, 4, 5, 6
l2: 7, 8, 3, 4, 5

sujjalsheth
Автор

very good explanation! I understand this now, thanks! :)

hhhuhhh
Автор

The conditions say that the heads are not equal
Subsequent nodes might be equal and not common (am I right? Or did I interpret it incorrectly?)

Eg:
List1: 1 - 2 - 3 - 4
\
8 - 9 - 10
/
List2: 0 - 3 - 5 - 6


Won't it be a better solution to reverse the two lists and return the data value from where the reversed lists diverge?!!

n_r_s
Автор

The fact that you code only 2-5 minute of the whole time makes me somehow think I can do it in 45 minutes

irinasaghoian
Автор

Amazing trick dude.. i wish my brain start catching these kind of tricks too :|

justlive
Автор

you eventually learn these tricks.. nothing like a genius brain, which will invent the techniques..

that is why it is called learning.

rahul_bali
Автор

dude, how do u think like that, thats really amazing!

tarachandprajapati
join shbcf.ru