• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Recent Posts

Maximum Contiguous Subarray Sum

Maximum Contiguous Subarray Sum

The maximum contiguous subarray sum problem is one of the classics. Given an 1D array of numbers $a_1, \dots, a_n$ with $a_i \in \mathbb{R}$, find $s$ such that: $$\exists l, r \in [1, \dots, n]: \forall p, q \in [1, \dots, n]: \sum_{i=p}^q \leq \sum_{i … Read More »
Project Euler: Problem 32

Project Euler: Problem 32

The task in Problem 32 of Project Euler is: We shall say that an $n$-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The product 7254 is unusual, as the … Read More »
Project Euler: Problem 26

Project Euler: Problem 26

The task in Problem 26 of Project Euler is: Find the value of d < 1000 for which $\frac{1}{d}$ contains the longest recurring cycle in its decimal fraction part. How to solve Think about how you divide with pen and paper. How do you recognize that you have a … Read More »
  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor