Skip to content

Instantly share code, notes, and snippets.

@Amberlamps
Last active September 17, 2025 08:06
Show Gist options
  • Save Amberlamps/adcf28393104d1ecf5b5b5536c7b43c6 to your computer and use it in GitHub Desktop.
Save Amberlamps/adcf28393104d1ecf5b5b5536c7b43c6 to your computer and use it in GitHub Desktop.
exercise.go
package main
import "fmt"
type Claim struct {
ID string
Amount int
}
type Insurer struct {
ID string
Balance int
}
type PayoutTransaction struct {
ClaimID string
InsurerID string
Amount int
}
func main() {
claims := []Claim{
{ID: "a", Amount: 100},
{ID: "b", Amount: 50},
{ID: "c", Amount: 40},
{ID: "d", Amount: 60},
{ID: "e", Amount: 20},
{ID: "f", Amount: 90},
{ID: "g", Amount: 120},
{ID: "h", Amount: 30},
}
insurers := []Insurer{
{ID: "A", Balance: 250},
{ID: "B", Balance: 250},
{ID: "C", Balance: 100},
}
// Example usage
fmt.Printf("Claims: %+v\n", claims)
fmt.Printf("Insurers: %+v\n", insurers)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment