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 in Python by Rajiv
• 4,860 points
26 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 by Gitika
• 50,340 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
188 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
125 views
+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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,562 views
0 votes
0 answers
+4 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,800 points
1,181 views
0 votes
1 answer
+1 vote
7 answers

Count the frequency of an item in a python list

To count the number of appearances: from collections ...READ MORE

answered Oct 18, 2018 in Python by tinitales
13,754 views