DEV Community

Beginner Developer
Beginner Developer

Posted on

1 line code to remove duplicate

I just learned a trick while solving a leet code problem.
duplicates from array can be removed from just 1 line of code 😀 without using default array_unique function

Ejaaz Khan
https://leetcode.com/problems/remove-duplicates-from-sorted-array/solutions/4517079/just-1-line-of-code-for-removing-dupllicate-from-an-array

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay