Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the actual name of Codility's Caterpillar method?

Tags:

algorithm

Codality has a funny way of naming things. Like for example: Instead of Majority Element they say "Leader".

There is a technique they describe here called Caterpillar method. What is the real technical name for this technique? (I guessed Backtracking, but I don't think so)

I am asking since I would like to read more about it other than the limited introduction provided by Codality.

like image 240
Khoj Badami Avatar asked Dec 26 '17 06:12

Khoj Badami


1 Answers

This sounds closer to the general method of two pointers. I don't think there's a proper name for it, but that's what I've heard it called most frequently. Further examples of its usage can be found on various interview prep sites, such as this one, as it's a common basis for a number of interview questions.

The triangle problem Codility posits can also be found here with more discussion.

like image 73
kevmo314 Avatar answered Nov 17 '22 09:11

kevmo314