Question

Write a recursive function that takes a list of numbers and returns a list of the...

Write a recursive function that takes a list of numbers and returns a list of the negative numbers in the list using python3.

Write a singly linked list that has no tail pointer, and write a function that returns the tail of the linked list.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

Note: Brother sometimes while uploading on HomeworkLib the indentations change. So, I request you to verify once with screenshot.

def negativeList(L,R,n):
if(n<0):
return R;
elif(L[n]<0):
R.append(L[n]);
return negativeList(L,R,n-1);
  
R=negativeList([1,2,-5,9,-3,3],[],4);
print(R);

Note: Brother according to HomeworkLib's policy we are only allowed to answer first part if there are many. So, I request you to post other part as separate posts.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Write a recursive function that takes a list of numbers and returns a list of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT