-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.dart
25 lines (25 loc) · 840 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import 'edgecases.dart';
import 'algos.dart';
main () {
int passed = 0;
int failed = 0;
for (int edgecasenumber = 0; edgecasenumber<8; edgecasenumber++) {
var card = edgecases(edgecasenumber)['input']['cards'];
var query = edgecases(edgecasenumber)['input']['query'];
var output = locate_card_new(edgecases(edgecasenumber)['input']['cards'], edgecases(edgecasenumber)['input']['query']);
var actual_ans = edgecases(edgecasenumber)['output'];
var outcome = output==actual_ans;
if (outcome) {
passed++;
} else {
failed++;
}
print('Edgecase:- $edgecasenumber');
print(" Cards:- $card");
print(" Query:- $query");
print(" Output:- $output");
print(" Actual answer:- $actual_ans");
print(" Outcome:- $outcome");
};
print('Passed:- $passed , Failed:- $failed');
}