Loading Company...
This is a verified interview question from Ibm. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Delete Odd Nodes in Linked List" covers key patterns like LinkedList.
"Given a linked list of integers, return a reference to the head of a similar linked list with all odd values removed. For example, your linked list values are 2 → 1 → 3 → 4 → 6. Your new linked list should be 2 → 4 → 6. ### Constraints * 1 ≤ n ≤ 10^5 * 1 ≤ Linked list node values ≤ 10^5 ### Input Format for Custom Testing The first line contains an integer n, the number of nodes in the list. Each of the next n lines contains an integer node->data."
Join thousands of developers practicing for Ibm.