bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Easy1-D Dynamic ProgrammingLC 507

Perfect Number

A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A divisor of an integer x is an integer that can divide x evenly. Given an integer n, return true if n is a perfect number, otherwise return_ false.

Asked at 2 companies
AmazonFallible
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode