a 'c' program to tell that the set of three coordinates lie
on a same line
Answer Posted / vamshi krishna
write a code that checks area of triangle formula i.e
x1(y3-y2)+x2(y1-y3)+x3(y2-y1)=0.
if zero points lie on same line
| Is This Answer Correct ? | 27 Yes | 2 No |
Post New Answer View All Answers
Why malloc is faster than calloc?
Why n++ execute faster than n+1 ?
What is difference between structure and union with example?
what do u mean by Direct access files? then can u explain about Direct Access Files?
difference between Low, Middle, High Level languages in c ?
I need a sort of an approximate strcmp routine?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Explain what is a static function?
Is fortran still used today?
Give me the code of in-order recursive and non-recursive.
Define the scope of static variables.
What does the c in ctime mean?
What is a struct c#?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What are the uses of a pointer?