FastPrepEven Values at Even Indices
Problems/Even Values at Even Indices

Even Values at Even Indices

Microsoft logoMicrosoft● EasyNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A Microsoft Data Scientist internship phone screen asks for the values in a list whose index and value are both even. We chose zero-based indexing, the function signature, the order and the limits.

Given an integer array nums, return every value whose zero-based index is even and whose value is also even.

Preserve the values' original order.

Function

evenValuesAtEvenIndices(nums: int[]) → int[]

Examples

Example 1

nums = [2,3,4,6,8]return = [2,4,8]

Indexes 0, 2, and 4 are even, and their values are also even.

Example 2

nums = [1,2,3,4]return = []

The values at even indexes are 1 and 3, so neither is returned.

Constraints

  • 0 <= nums.length <= 100000
  • -10^9 <= nums[i] <= 10^9

More Microsoft Phone Screen questions

  • Config Store with Priority OverridesPHONE SCREEN · Seen Nov 2026
  • Corporation Reporting LinesPHONE SCREEN · Seen Oct 2026
  • Random Forest Classifier from ScratchPHONE SCREEN · Seen Oct 2026
  • Least Recently Used CacheOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Greedy and Beam Sentence DecodingPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Top K Frequent ElementsPHONE SCREEN · Seen Sep 2026
  • 3SumPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Arithmetic Expression EvaluatorPHONE SCREEN · Seen Sep 2026
  • Employee Hierarchy Cycle and Depth AnalysisPHONE SCREEN · Seen Sep 2026
  • Most Visited String SectorsPHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Pascal's TriangleBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Sparse Vector Dot Product from TuplesMeta · PHONE SCREEN · ONSITE INTERVIEWMeta interview questions
  • Numerically Stable SoftmaxWaymo · PHONE SCREENWaymo interview questions
  • Best Average Student ScoreGoldman Sachs · PHONE SCREEN · ONSITE INTERVIEWGoldman Sachs interview questions
  • Logger Rate LimiterGoogle · PHONE SCREENGoogle interview questions
  • Minimum StackSnowflake · PHONE SCREENSnowflake interview questions
  • Streaming Entropy, Part 1: Batch EntropyOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Merchant Payout Reserve CalculatorStripe · PHONE SCREENStripe interview questions
  • Price CheckBlue Origin · PHONE SCREEN
  • Lazy Filter over a GeneratorSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions

Interview reports that mention this question

  • Microsoft AI/ML Intern Interviews: 114 Experiences (Part 1 of 2)

Microsoft interview experiences

  • Microsoft OA Questions, October 2026: 4 Experiences
  • Microsoft Experienced SWE Phone Screen: 1 Experience
  • Microsoft Explore and Student SWE: 12 Experiences (Part 6 of 6)
  • Microsoft SWE Intern, Early 2025: 41 Experiences (Part 5 of 6)
  • Microsoft SWE Intern, Mid 2025: 42 Experiences (Part 4 of 6)
All Microsoft interview questionsSee Microsoft hiring insights
Saved
class Solution {
    public int[] evenValuesAtEvenIndices(int[] nums) {
      // Write your code here.
    }

}
Checking account…