FastPrepDelete a Doubly Linked List Node at a Position
Problems/Delete a Doubly Linked List Node at a Position

Delete a Doubly Linked List Node at a Position

Qualys logoQualys● EasyFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Qualys onsite interview. The report asks you to delete a node at a given position in a doubly linked list. We chose zero-based positions, positions that are always valid, an array to show the list, the examples, and the limits.

Given the values of a doubly linked list and a zero-based position, delete the node at that position and return the remaining values in forward order.

For the practice runner, values serializes the list from head to tail. Build or reason about the doubly linked structure, reconnect both neighboring links, update the head when needed, and return the serialized result.

Function

deleteAtPosition(values: int[], position: int) → int[]

Examples

Example 1

values = [4,8,15,16]position = 2return = [4,8,16]

Deleting index 2 removes 15 and reconnects 8 with 16.

Example 2

values = [7]position = 0return = []

Deleting the only node leaves an empty list.

Constraints

  • 1 <= values.length <= 10^5.
  • -10^9 <= values[i] <= 10^9.
  • 0 <= position < values.length.

More Qualys Onsite Interview questions

  • Find the Entry of a Linked List CycleONSITE INTERVIEW · Seen Oct 2026
  • Implement Binary SearchONSITE INTERVIEW · Seen Oct 2026
  • Insert a Doubly Linked List Node at a PositionONSITE INTERVIEW · Seen Oct 2026
  • Rotate an Array Right by K StepsONSITE INTERVIEW · Seen Oct 2026
  • Valid ParenthesesONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Reverse Linked ListByteDance · PHONE SCREEN · ONSITE INTERVIEWByteDance interview questions
  • Reverse Linked ListAutodesk · ONSITE INTERVIEWAutodesk interview questions
  • Detect a Loop in a Linked ListEPAM · ONSITE INTERVIEWEPAM interview questions
  • Insert After a Linked-List NodeAMD · ONSITE INTERVIEWAMD interview questions
  • Reverse a Singly Linked ListGoogle · ONSITE INTERVIEWGoogle interview questions
  • Process Singly Linked List OperationsSEDEMAC · ONSITE INTERVIEW
  • Merge Two Sorted Linked ListsZS · ONSITE INTERVIEWZS interview questions
  • Middle Node Of A Linked ListNVIDIA · ONSITE INTERVIEWNVIDIA interview questions
  • Build and Check a Palindrome Linked ListOmnissa · ONSITE INTERVIEWOmnissa interview questions
  • Reverse a Singly Linked ListGEP · ONSITE INTERVIEW
All Qualys interview questionsSee Qualys hiring insights
Saved
class Solution {
    public int[] deleteAtPosition(int[] values, int position) {
        // Write your solution here.
    }
}
Checking account…