2727. Is Object Empty
LeetCodeOpen on judge ↗
Given an object or an array, return if it is empty. - An empty object contains no key-value pairs. - An empty array contains no elements. You may assume the object or array is the output of JSON.parse. Example 1: Input: obj = {"x": 5, "y": 42} Output: false Explanation: The object has 2 key-value pairs so it is not empty. Example 2: Input: obj = {} Output: true Explanation: The object doe
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start