Cody

Problem 2456. remove single elements

Created by rifat in Indexing III

Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as the input except the single elements being removed.

Example:

Input: vec = [2 2 1 2 3 4 1 2];
Output: [2 2 1 2 1 2];

Loops are not allowed.

Solution Stats

35.17% Correct | 64.83% Incorrect
Last solution submitted on Jul 19, 2019

Problem Comments

Solution Comments

Recent Solvers44

Suggested Problems

More from this Author45