Question: Given two lists of integers, L1 & L2. Write a piece of pseudopod that will insert L2 into L1 before the first negative valued element

Given two lists of integers, L1 & L2. Write a piece of pseudopod that will insert L2 into L1 before the first negative valued element of L1. If L1 contains no negative values, then insert L2 at the end. The list L2 should be empty at the end of the operation. For example: Before: L1: {22, 5, 77, -4, 65}; L2: {33, 44, 67} After: L1: {22, 5, 77, 33, 44, 67. -4, 65, 3; L2: {}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
