Skip to content
0:00 / 0:00

#leetcode#gcd#apl

1 Problem, 16 Programming Languages (C++ vs Rust vs Haskell vs Python vs APL...)

code_report

62K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • A classic. People kept recommending it from 2021 to 2025.
  • Linked in the descriptioncodereport/LeetCode

Intermediate. Assumes working knowledge.

163K views5 years ago2 recommendations

Programming languagesComputer scienceLanguage design and type systemsAlgorithms

An analysis of solutions to the Greatest Common Divisor of Array problem across sixteen different programming languages.

A video taking a look at 16 programming language solutions (C++, Rust, D, Clojure, Ruby, Elixir, Raku [Perl 6], Haskell, Racket, Julia, Python, APL, J, BQN, Pharo Smalltalk & Fortran) to one problem. ADSP Podcast: adspthepodcast.com/ Array Cast: arraycast.com/ Contest: 255 Problem Name: Find GCD of Array Problem Link: leetcode.com/problems/find-greatest-common-divisor-of-array/ Problem Type: Greedy Github Links / Chapters: Intro Problem Statement Python: github.com/codereport/LeetCode/blob/master/0255_Problem_1.py Julia: github.com/codereport/LeetCode/blob/master/0255_Problem_1.jl Raku: github.com/codereport/LeetCode/blob/master/0255_Problem_1.ra… Ruby: github.com/codereport/LeetCode/blob/master/0255_Problem_1.rb Elixir: github.com/codereport/LeetCode/blob/master/0255_Problem_1.ex… Haskell: github.com/codereport/LeetCode/blob/master/0255_Problem_1.hs Racket: github.com/codereport/LeetCode/blob/master/0255_Problem_1.rk… Clojure: github.com/codereport/LeetCode/blob/master/0255_Problem_1.cl… C++: github.com/codereport/LeetCode/blob/master/0255_Problem_1.cp… D: github.com/codereport/LeetCode/blob/master/0255_Problem_1.d Rust: github.com/codereport/LeetCode/blob/master/0255_Problem_1.rs APL: github.com/codereport/LeetCode/blob/master/0255_Problem_1.ap… Fork / S' Combinator / Starling' / Phoenix J: github.com/codereport/LeetCode/blob/master/0255_Problem_1.ij… BQN: github.com/codereport/LeetCode/blob/master/0255_Problem_1.bq… Pharo: github.com/codereport/LeetCode/blob/master/0255_Problem_1.st Fortran: github.com/codereport/LeetCode/blob/master/0255_Problem_1.f9… Languages not covered Rankings Summary Podcasts and Outro Follow me on Github: github.com/codereport Follow me on Twitter: twitter.com/code_report Follow me on LinkedIn: linkedin.com/company/codereport/

Why it's here

2 people recommend this

What people say. Recommended as an interesting comparison of syntax and paradigms across sixteen different programming languages solving the same problem.

dunyakirkalion Lobsters • Recommends

1 Problem, 16 Programming Languages (2021)

u/arkethosin r/haskell • Recommends

1 Problem, 16 Programming Languages (Haskell wins 2nd place!)

u/middaycRyelangin r/ProgrammingLanguages • Mentions

On “September 2025 monthly "What are you working on?" thread”

Was away from work for a while, now, trying to make an elegant point-free solution to this problem [video I added new types of blocks to the language .( ) and .\\ ... A much longer explanation of the mechanics in this reddit post find-gcd: fn1 { ..min , .max .apply ?math/gcd } find-gcd { 4 5 10 6 7 } ; returns 2