Tap here to switch tabs
Problem
Submissions

Problem: Valid Perfect Square

med
30 min
Try to solve the Valid Perfect Square problem.

Statement

Given a positive integer num, determine whether there exists an integer x such that x * x equals num. Return true if num is a perfect square, otherwise return false.

Constraints:

  • 1≤1 \leq num ≤231−1\leq 2^{31} - 1

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Valid Perfect Square

med
30 min
Try to solve the Valid Perfect Square problem.

Statement

Given a positive integer num, determine whether there exists an integer x such that x * x equals num. Return true if num is a perfect square, otherwise return false.

Constraints:

  • 1≤1 \leq num ≤231−1\leq 2^{31} - 1