MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / Problem4

Function Problem4

project_euler/problem_4/problem4.go:19–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func Problem4() uint {
20 max := uint(0)
21
22 for i := 999; i >= 100; i-- {
23 for j := 999; j >= 100; j-- {
24 n := uint(i * j)
25
26 if palindrome.IsPalindrome(fmt.Sprintf("%d", n)) && n > max {
27 max = n
28 }
29 }
30 }
31
32 return max
33}

Callers 2

TestProblem4_FuncFunction · 0.85
BenchmarkProblem4Function · 0.85

Calls 1

IsPalindromeFunction · 0.92

Tested by 2

TestProblem4_FuncFunction · 0.68
BenchmarkProblem4Function · 0.68