Google Interview Question — LeetCode 1296

Y Tech
2 min readFeb 1, 2022

In this post, we are going to discuss leetcode 1296 — Divide Array in Sets of K Consecutive Numbers, which is recently asked in Google interviews.

Problem Analysis

Given an array of integers nums and a positive integer k, check whether it is possible to divide this array into sets of k consecutive numbers.

Return true if it is possible. Otherwise, return false.

Example 1:

Input: nums = [1,2,3,3,4,4,5,6], k = 4 
Output: true
Explanation: Array can

--

--