you give log user action LeetCode integer k the log represent 2D integer array log logsi IDi timei indicate user IDi perform action minute timeiMultiple user perform action simultaneously single user perform multiple action minutethe user active minute UAM give user define number unique minute user perform action LeetCode A minute count multiple action occur ityou calculate 1indexed array answer size k j 1 j k answerj number user UAM equal jReturn array answer describe Example 1input log 0512020513 k 5output 02000explanationthe user ID0 perform action minute 5 2 5 hence UAM 2 minute 5 count oncethe user ID1 perform action minute 2 3 hence UAM 2since user UAM 2 answer2 2 remain answerj value 0example 2input log 112223 k 4Output 1100explanationthe user ID1 perform single action minute 1 hence UAM 1the user ID2 perform action minute 2 3 hence UAM 2there user UAM 1 UAM 2hence answer1 1 answer2 1 remain value 0 Constraints1 logslength 1040 IDi 1091 timei 105k range the maximum UAM user 105