File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 54
54
< select id ="selected-algorithm " onchange ="changeInSelectedAlgorithm(value) ">
55
55
< option value ="linear-search "> Linear Search</ option >
56
56
< option value ="binary-search "> Binary Search</ option >
57
+ < option value ="selection-sort "> Selection Sort</ option >
58
+ < option value ="bubble-sort "> Bubble Sort</ option >
57
59
</ select >
58
60
</ div >
59
61
102
104
}
103
105
104
106
function changeInSelectedAlgorithm ( value ) {
105
- appendSelectedArraySizeElement ( getArraySize ( ) )
107
+ if ( value !== 'selection-sort' && value !== 'bubble-sort' ) {
108
+ appendSelectedArraySizeElement ( getArraySize ( ) )
109
+ } else {
110
+ alert ( 'Selected algorithm will be available soon :)' )
111
+ document . getElementById ( "selected-algorithm" ) . value = "linear-search"
112
+ }
106
113
}
107
114
108
115
function enableUserPreference ( ) {
You can’t perform that action at this time.
0 commit comments