Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvam25 committed Mar 13, 2020
1 parent 5d8cee2 commit 4c3da8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 209 deletions.
204 changes: 0 additions & 204 deletions Backtracking_Crossword_Problem/Backtracking_Problem.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ int minAbsoluteDiff(int arr[], int n)
int mindiff = INT_MAX;
for(int i=0;i<n-1;i++)
{
if(abs(arr[i] - arr[i+1]) < mindiff)
mindiff = abs(arr[i] - arr[i+1]);
if(abs(arr[i] - arr[i+1]) < mindiff)
mindiff = abs(arr[i] - arr[i+1]);
}
return mindiff;
}
Expand All @@ -28,12 +28,10 @@ int main()
int size,i;
scanf("%d",&size);
int input[size];

for(i = 0; i < size; i++)
scanf("%d", &input[i]);
scanf("%d", &input[i]);

printf("%d",minAbsoluteDiff(input,size));

return 0;
}

Expand Down

0 comments on commit 4c3da8b

Please sign in to comment.