← MakeMyTrip questions

Segregate Even and Odd Numbers in an Array

Filed under MakeMyTrip

Given an array of integers, write a function that segregates even and odd numbers such that all even numbers appear before all odd numbers in the array.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.