Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ardan-bkennedy committed Sep 28, 2021
1 parent 36106fa commit a941c24
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions topics/go/algorithms/searches/linearsearch/linearsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func linearSearchIterative(list []int, target int) int {
// find the target.
func linearSearchRecursive(list []int, target int, index int) int {
switch {

case len(list) <= index:
return -1

Expand Down Expand Up @@ -54,7 +53,6 @@ func doubleLinearSearchIterative(list []int, target int) int {
// Continue loop until leftIdx is smaller or equal to rightIdx value.
for leftIdx <= rightIdx {
switch {

case list[leftIdx] == target:
return leftIdx

Expand All @@ -76,7 +74,6 @@ func doubleLinearSearchIterative(list []int, target int) int {
func doubleLinearSearchRecursive(list []int, target int, leftIdx int, rightIdx int) int {
if len(list) > 0 {
switch {

case list[leftIdx] == target:
return leftIdx

Expand Down

0 comments on commit a941c24

Please sign in to comment.