Problem database last updated: June 20, 2025

SSiemens logo

Siemens Coding Interview Questions

25 problems · 10 Easy, 11 Medium, 4 Hard · Ranked #79 of 458

Difficulty breakdown

10 Easy

40% · avg 23%

11 Medium

44% · avg 59%

4 Hard

16% · avg 18%

Top topics

array
56%
sorting
32%2.2x
string
24%
hash-table
24%
linked-list
20%2.8x
two-pointers
16%

Interview profile

Based on 25 reported problems, Siemens interviews are in line with industry averages - 16% Hard vs 18% overall.

Compared to the industry average, Siemens puts unusual emphasis on binary-indexed-tree (8% of problems, 18x the industry average), segment-tree (8% of problems, 13.1x the industry average), linked-list (20% of problems, 2.8x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (56%), sorting (32%), string (24%), hash-table (24%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 25 problems

Peaks in Array

Solve

A peak in an array arr is an element that is greater than its previous and next element in arr.

HardVery Likely
arraybinary-indexed-treesegment-tree

Minimized Maximum of Products Distributed to Any Store

Solve

You are given an integer n indicating there are n specialty retail stores. There are m product types of varying amounts, which are given as a 0-indexed integer...

MediumVery Likely
arraybinary-searchgreedy

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumVery Likely
arraydepth-first-searchbreadth-first-search

Valid Parentheses

Solve

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

EasyVery Likely
stringstack

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumVery Likely
arraysorting

Letter Combinations of a Phone Number

Solve

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

MediumLikely
hash-tablestringbacktracking

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasyLikely
arraydynamic-programming

Reverse Linked List

Solve

Given the head of a singly linked list, reverse the list, and return the reversed list.

EasyLikely
linked-listrecursion

Contains Duplicate

Solve

Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.

EasyLikely
arrayhash-tablesorting

Merge Two Sorted Lists

Solve

You are given the heads of two sorted linked lists list1 and list2.

EasyLikely
linked-listrecursion

LFU Cache

Solve

Design and implement a data structure for a Least Frequently Used (LFU) cache.

HardLikely
hash-tablelinked-listdesign

The Skyline Problem

Solve

A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Given the locations and heights of...

HardLikely
arraydivide-and-conquerbinary-indexed-tree

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyLikely
arrayhash-map

First Missing Positive

Solve

Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.

HardLikely
arrayhash-table

Rotate List

Solve

Given the head of a linked list, rotate the list to the right by k places.

MediumLikely
linked-listtwo-pointers

Valid Anagram

Solve

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

EasyLikely
hash-tablestringsorting

Palindrome Linked List

Solve

Given the head of a singly linked list, return true if it is a palindrome or false otherwise.

EasyLikely
linked-listtwo-pointersstack

Largest Number

Solve

Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.

MediumLikely
arraystringgreedy

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumLikely
arraytwo-pointerssorting

Seat Reservation Manager

Solve

Design a system that manages the reservation state of n seats that are numbered from 1 to n.

MediumLikely
designheap-priority-queue

Remove Duplicates from Sorted Array

Solve

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...

EasyLikely
arraytwo-pointers

Angle Between Hands of a Clock

Solve

Given two numbers, hour and minutes, return the smaller angle (in degrees) formed between the hour and the minute hand.

MediumLikely
math

Maximum Product of Three Numbers

Solve

Given an integer array nums, find three numbers whose product is maximum and return the maximum product.

EasyLikely
arraymathsorting

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumLikely
arrayhash-tablestring

Minimum Add to Make Parentheses Valid

Solve

A parentheses string is valid if and only if:

MediumLikely
stringstackgreedy

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Siemens interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Siemens coding interview

Siemens interviews focus heavily on array, sorting, string problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Siemens interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Siemens ask in interviews?add

Siemens has been reported to ask 25 distinct coding problems. The most common topics are array, sorting, string. 10 are Easy difficulty, 11 are Medium, and 4 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Siemens coding interviews?add

Based on 25 reported problems, Siemens interviews are in line with industry averages - 16% Hard vs 18% overall. 44% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Siemens coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, sorting, string. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Siemens interview?

Simulate a real Siemens coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Siemens interview with AIarrow_forward