<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathBarld
{
    public class Fibonacci
    {
        static int f1 = 1;
        static int f2 = 1;

        public static int GetFibonacciNumberRecursive(int number)
        {
            if (number == 1)
                return f1;
            else if (number == 2)
                return f2;
            else
                return GetFibonacciNumberRecursive(number - 1) + GetFibonacciNumberRecursive(number - 2);
        }

        static List<int> numbers = new List<int>() { 0, 1, 1 };

        public static int RecursiveWithCache(int number)
        {
            if(numbers.Count < number+1)
            {                
                numbers.Add(RecursiveWithCache(number - 1) + RecursiveWithCache(number - 2));
            }
            return numbers[number];            
        }

        public static int GetFibonacciNumberIterative(int number)
        {
            if (number == 1)
                return f1;
            else if (number == 2)<commit_msg>mogelijk fout opgelost met gebruik van static fields die altijd 1 hoeren te zijn en kortere notatie<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathBarld
{
    public class Fibonacci
    {
        static int f1 = 1;
        static int f2 = 1;

        public static int GetFibonacciNumberRecursive(int number)
        {
            if (number <= 2)
                return 1;
            else
                return GetFibonacciNumberRecursive(number - 1) + GetFibonacciNumberRecursive(number - 2);
        }

        static List<int> numbers = new List<int>() { 0, 1, 1 };

        public static int RecursiveWithCache(int number)
        {
            if(numbers.Count < number+1)
            {                
                numbers.Add(RecursiveWithCache(number - 1) + RecursiveWithCache(number - 2));
            }
            return numbers[number];            
        }

        public static int GetFibonacciNumberIterative(int number)
        {
            if (number == 1)
                return f1;
            else if (number == 2)
{'fraction_non_alphanumeric': 0.07927369353410098, 'fraction_numerical': 0.016386182462356066, 'mean_word_length': 1.6639150943396226, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '622221', 'n_tokens_mistral': 664, 'n_tokens_neox': 620, 'n_words': 169}