Function to check if a point lies inside a triangle or not
static int isInside ( ArrayList < ArrayList < Integer > > triangle , ArrayList < Integer > point ) { ArrayList < Integer > A = triangle . get ( 0 ) ; ArrayList < Integer > B = triangle . get ( 1 ) ; ArrayList < Integer > C = triangle . get ( 2 ) ; int x = point . get ( 0 ) ; int y = point . get ( 1 ) ;