1. Home
  2. /
  3. K
  4. /
  5. Fibonacci Sequence

Fibonacci Sequence - K Typing CST Test

Loading…

Fibonacci Sequence — K Code

Generates first 10 Fibonacci numbers using K arrays.

fib:0 1
10{fib,:{x,y:x+y} last 2 fib}

K Language Guide

K is a high-performance, array-oriented programming language designed for financial and analytical applications. It provides concise syntax for working with large datasets, time-series data, and complex calculations, and is often used in conjunction with the kdb+ database system.

Primary Use Cases

  • ▸Financial analytics and trading systems
  • ▸Real-time market data processing
  • ▸Time-series data analysis
  • ▸High-performance data querying
  • ▸Integration with kdb+ database for analytics

Notable Features

  • ▸Array-oriented and vectorized operations
  • ▸Extremely concise and symbolic syntax
  • ▸Integration with kdb+ for database operations
  • ▸Supports functional and tacit programming styles
  • ▸Optimized for high-performance numeric and temporal calculations

Origin & Creator

Developed by Arthur Whitney in the early 1990s, as a successor to APL and influenced by the language Q.

Industrial Note

K is primarily used in the financial industry, especially for high-frequency trading, quantitative research, and time-series analysis.

More K Typing Exercises

K Counter and Theme ToggleK Factorial CalculatorK Prime CheckerK Sum of ArrayK Reverse StringK Multiplication TableK Celsius to FahrenheitK Simple Alarm SimulationK Random Walk Simulation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher