Can we use sliding window on first and last string
@jupingng8637 Жыл бұрын
Vertica: Start with terse / pessimistic condition, and slowly relax. Horizontal: Start with relaxed / optimistic condition, and slowly constrain.
@MrSirr Жыл бұрын
i dont understand in the horizontal prefix, what if the 1st word is different, [hello, flower, flight] wont it return "" since h != f ?
@onecodeman Жыл бұрын
Hey Natan, for the Horizontal Prefix, the algorithm gonna take the length of the first word and use it as a limit for the second word for example Hello have length 4 so we gonna compare it to only the word flow and we gonna eliminate the two last letters, then its gonna keep doing the same thing each time reducing the last character and comparing, for your example its gonna return false, hope this help
@karunakarkoyada69 Жыл бұрын
can u explain in javascript?
@onecodeman Жыл бұрын
I will do it next time, but you can use the explanation in this video and try to convert it to JavaScript that will help you a lot, also that gonna help you to start solving problems quickly 🙏