LeetCode
LeetCode copied to clipboard
Solutions to LeetCode problems in C++, Python, Haskell, APL, Java, Ruby, Rust, Racket, Scala, Kotlin, C#, F#, Clojure, Elixir, Swift, Julia, Smalltalk, Nim, Raku, BQN, Nial, SaC, Futhark, D, Q, J, K,...
MaximumCount ← ⌈´≠-⌾⊑⍋⟜0‿¯1
Using type declarations (especially in conjunction with strict_types) can result in faster code, and is considered best practice in modern php code. Php has an explicit `elseif` you can/should use...
Yes Fortran can accept an undeclared size array as an argument, reducing the "ceremony" needed ```fortran integer function find_gcd(nums) integer, intent(in) :: nums(:) find_gcd = gcd(minval(nums), maxval(nums)) end function ```...
Solution 2 works on a pair of characters at a time (not very Jish) Solution 3 separates the string into a list of even indexes and a list of odd...