The Githubers
kavi_castelo's profile
kavi castelo@kavi_castelo•Nov 24, 2025
1.7K
Talentboozt's profile
Post cover image

kavicastelo/construct-target-array: This project provides three different implementations of the LeetCode problem: Given a target array, determine if it is possible to build it from an array of all on

From github.com•Nov 23, 2025•4m read time

Three TypeScript implementations of LeetCode problem 1354 (Construct Target Array) are compared: FastHeap uses a lightweight max heap for speed on small inputs, FullHeap employs a robust heap structure that excels with medium-to-large arrays, and NoHeap relies on sorting each iteration as a simple reference. Benchmarks show FastHeap wins on small and adversarial cases, FullHeap dominates medium-large datasets, while NoHeap remains slowest but easiest to understand. The solution uses reverse reduction logic with modulo operations to determine if a target array can be built from all ones.

Sort:

kavi_castelo's user avatar
kavi castelo
@kavi_castelo
Joined Sep 21. 2022
1.7K
Talentboozt's profile

Talentboozt

Verified

🚀 Engineering the Future | SaaS Architect | Full-Stack Enthusiast | Tech Leader & Innovator

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard