Basic Type Buckets

JavaScript Easy 3 views
Back to Questions

Problem Description

You get a JSON array with mixed values. Count how many are: number, string, boolean, null, array, object. Print 6 counts in this order.

Input Format

One line JSON array.

Output Format

Six integers space separated.

Sample Test Case

Input:
[1,"a",true,null,[2],{"x":1},false]
Output:
1 1 2 1 1 1

Constraints

Array length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next