-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_results_explanation.txt
More file actions
40 lines (35 loc) · 2.1 KB
/
test_results_explanation.txt
File metadata and controls
40 lines (35 loc) · 2.1 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
======================================================================
TEST 1: Small random array (n=10)
======================================================================
Algorithm: insertion_sort
Has justification: True
Explanation (first 300 chars): Array is small array → Insertion Sort selected (efficient for small/sorted inputs).<br><br><strong>Why Insertion Sort despite higher theoretical operations?</strong><br>For n = 10, theoretical estimates are n log n ≈ 33 vs n² ≈ 100. However, asymptotic complexity (Big-O) only describes growth rate —
======================================================================
TEST 2: Small nearly-sorted array (n=30)
======================================================================
Algorithm: insertion_sort
Has justification: True
======================================================================
TEST 3: Large random array (n=5000) - should NOT have justification
======================================================================
Algorithm: merge_sort
Has justification: False
Explanation: Array is large array → Merge Sort selected (guaranteed O(n log n) performance).
======================================================================
TEST 4: Reverse sorted small (n=30) - merge_sort, no justification
======================================================================
Algorithm: merge_sort
Has justification: False
Explanation: Array is small array, reverse sorted → Merge Sort selected (guaranteed O(n log n) performance).
======================================================================
TEST 5: _n_from_features round-trip
======================================================================
n= 5 -> size_log=0.194536 -> recovered= 5 OK
n= 10 -> size_log=0.260345 -> recovered= 10 OK
n= 20 -> size_log=0.330551 -> recovered= 20 OK
n= 30 -> size_log=0.372836 -> recovered= 30 OK
n= 40 -> size_log=0.403192 -> recovered= 40 OK
n= 50 -> size_log=0.426888 -> recovered= 50 OK
n= 100 -> size_log=0.501075 -> recovered= 100 OK
n= 1000 -> size_log=0.750100 -> recovered= 1000 OK
ALL TESTS COMPLETE