Erlang Triangle
-module(triangle).
-export([triangle/1]).

triangle(A) ->
    Sorted = lists:sort(A),
    N = length(Sorted),
    case N < 3 of
        true -> 0;
        false ->
            Triples = lists:zip3(Sorted, tl(Sorted), tl(tl(Sorted))),
            case lists:any(fun({X, Y, Z}) -> X > 0 andalso X > (Z - Y) end, Triples) of
                true -> 1;
                false -> 0
            end
    end.

This sorts the values and checks nearby triples, because a valid triangle only needs one local match after sorting.