-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve tests for road_network and search_unknown_length_array
- Loading branch information
Stefan Tudose
committed
Jan 26, 2022
1 parent
d9f95b1
commit 98f5b56
Showing
5 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package road_network | ||
|
||
func FindBestProposals(h []HighwaySection, p []HighwaySection, n int) *HighwaySection { | ||
func FindBestProposals(h []HighwaySection, p []HighwaySection, n int) HighwaySection { | ||
// TODO - Add your code here | ||
return nil | ||
return HighwaySection{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package search_unknown_length_array | ||
|
||
type ArrayUnknownLength interface { | ||
// Get returns the value at the given index in the array, if the index is valid. | ||
// In this case the valid flag will be true. | ||
// In case the index is out of bounds, it returns valid = false and an unspecified value. | ||
Get(index int) (value int, valid bool) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package search_unknown_length_array | ||
|
||
func BinarySearchUnknownLength(a []int, k int) int { | ||
func BinarySearchUnknownLength(a ArrayUnknownLength, k int) int { | ||
// TODO - Add your code here | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters