Search⌘ K
AI Features

Challenge: Remove Even Integers From Array

Explore how to filter out even integers from an array using Java. This lesson helps you understand array manipulation basics and constraints to implement efficient solutions in coding interviews.

We'll cover the following...

Statement

Given an array of integers, arr, remove all the even integers from the array.

Constraints:

  • 11 \leq arr.length 103\leq 10^3
  • 105-10^5 \leq arr[i] 105\leq 10^5

Examples

canvasAnimation-image
1 / 4

Try it yourself

Implement your solution in the following coding playground.

Java
usercode > Solution.java
import java.util.*;
class Solution{
public static int[] removeEven(int[] arr) {
int[] result = new int[] {};
// Replace this placeholder return statement with your code
return result;
}
}
Remove Even Integers From Array