Skip to content

Bhanu's Blog

it's not about being the best it's about being better than yesterday

Bhanu's Blog

it's not about being the best it's about being better than yesterday

Day: February 1, 2024

Leetcode

2966. Divide Array Into Arrays With Max Difference

  • bhanunadar
  • Posted on February 1, 2024

Problem Statement: Given an array of integers and a threshold value k, the task is to divide the array into triplets such that the absolute difference between adjacent elements in each triplet does not exceed k. If such division is possible, return the triplets; otherwise, return an empty array. Approach: To efficiently divide the array…

Read More

Recent Posts

  • TIL: Docker Namespaces
  • My Experience with LG Ultragear 32GS60QC (32 inch)
  • TIL: Value Classes
  • Counting Subarrays Where the Max Appears At Least K Times (LeetCode 2962)
  • Solo motorcycle trip to Ratnagiri from Mumbai

Copyright © All rights reserved. Proudly powered by WordPress | Theme: Blog Nano by ThemeMiles.