Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The purpose of the function you're writing is to return the nth Fibonnacci term.
"nth_fib(1)" he expects "0" as an answer; 0 is the 1st term in the sequence.
"nth_fib(4)" he expects "2"; similarly, 2 is the 4th term in the sequence.
Consequently, provided n, return the nth number of the Fibonnacci sequence.
Hi there! The 8 is the count of how many numbers meet the criteria while 118 is the lower bound of the eight numbers and 334 is the upper bound. In other words, if you find all the numbers and put them in an array
A = [118, 127, 136, 145, 226, 235, 244, 334]
, then the answer is[length(A), min(A), max(A)]
No:
Read the title and the kata description again.
he means -2 + 1 = -1, this sum is less than 6,
the largest sum (when adding adjacent indices is 6 = 4 + (-1) + 2 + 1)
Definitely not a kata issue. Please read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution specially how to post a code block, in-line code in Python is very hard to read.
the question ask you to write a method to find the linges palindrome form the given string
palindrome is if a word is read in reverse string it spells the same
example abba - is same if read in reverse
so if a string is given as "hello world abba, that is kayak"
in here there are 2 palindrome (substring) abba and kayak but the longest one is kayak (length of 5)
so writing a function to find the longest palindrome and return it
This comment is hidden because it contains spoiler information about the solution
Basically the kata is asking for the subarray aka values that are next to each other in terms of indexes sum that is the greatest sum
for example
{-2,1} or -1 < 6 aka(4-1,2,1)
-2+1+-3+4-1+2+1-5+4 < 6
and so on
Not a kata issue, your function doesn't return in the first sample test.