Tagged articles
2 articles
Page 1 of 1
Laravel Tech Community
Laravel Tech Community
Dec 3, 2020 · Backend Development

PHP array_unique() – Removing Duplicate Values from an Array

This article explains how the PHP array_unique() function removes duplicate values from an array while preserving original keys, describes its optional sort_flags parameter, lists sorting constants, and provides a complete example with code and expected output.

ArrayBackendDuplicate
0 likes · 2 min read
PHP array_unique() – Removing Duplicate Values from an Array
Programmer DD
Programmer DD
May 14, 2020 · Backend Development

How Does Java’s HashSet Ensure No Duplicate Elements?

This article explains how Java's HashSet implementation guarantees element uniqueness by internally using a HashMap, detailing its constructors, internal fields, the add method, and the underlying HashMap put and putVal logic that handles collisions and duplicate detection.

CollectionsDuplicateHashMap
0 likes · 6 min read
How Does Java’s HashSet Ensure No Duplicate Elements?