I want to generate Fibonacci sequence of 100 numbers in Linked list and then reverse in python

0 votes

I want to generate a Fibonacci sequence of 100 numbers in the Linked list and then reverse.

For a given linked list containing the first 100 numbers of the sequence 0,1,1,2,3,5,8,13,......218922995834555200000, provide a solution that returns a linkedlist in the following order 218922995834555200000,..........13,8,5,3,2,1,1,0.

Can someone help me out with this?

Oct 12, 2020 in Python by Rajiv
• 8,910 points
1,223 views

1 answer to this question.

0 votes

Hey, 

You can go through the given example below:

Create a linked list with 0,1 then 
i = 2
a=0
b=1
While i <=100 :
    c =a+b
    a=b
    b=c
    linkedList.append(c)
answered Oct 12, 2020 by Gitika
• 65,890 points

Related Questions In Python

0 votes
1 answer

Is there a way to list out in-built variables and functions of Python?

The in-built variables and functions are defined ...READ MORE

answered May 14, 2019 in Python by Junaid
2,142 views
0 votes
1 answer

How do I create 3 X 4 array of random numbers between 0 and 100 using python?

Use numpy in the following manner: np.random.rand(3,4)*100 When you ...READ MORE

answered May 24, 2019 in Python by Radhika
2,213 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,351 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,910 views
+1 vote
4 answers

how to sort a list of numbers without using built-in functions like min, max or any other function?

Yes it is possible. You can refer ...READ MORE

answered Jun 27, 2019 in Python by Arvind
• 3,050 points
188,030 views
0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,890 points
2,327 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP