Here is the Simplest working solution :)
bool check(int x[],int y[],int n)
{
c=0;
for(int i=0;i<n;i++) {
j=(i+1)%n;
if( ((y[i]>y) != (y[j]>y)) && (x-x[i]/x[j]-x[i] < y-y[i]/y[j]-y[i])
c=!c;
}
return c;
}
On Sep 20, 7:46 pm, umesh kewat <[email protected]> wrote:
> Initially we have given three point A , B, C in plane represent three nodes
> of triangle, now given another point Z which lies in same plane, find out
> whether that point lies on/inside the triangle or outside of triangle....try
> to get in min time and space complexity
>
> --
> Thanks & Regards
>
> Umesh kewat
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.