Sort by

recency

|

128 Discussions

|

  • + 0 comments
     var r = 0
        arr.foreach(x => r += 1)
        r
    
  • + 0 comments

    Counting the number of elements in an array without using built-in length functions is a great exercise in problem-solving. CBTF7

  • + 0 comments

    This coding challenge is a great exercise in thinking outside the box! Betbook247

  • + 0 comments

    Erlang Solution:

    -module(solution).
    -export([main/0]).
    
    counter(Curr)->
        case io:fread("","~d") of
            eof -> io:format("~p~n",[Curr]);
            {ok,[N]}-> counter(Curr+1)
        end.
    
    
    main() ->
    	counter(0).
    
  • + 0 comments

    scala

    ( arr.reduce((a,b)=>a+1) - arr.head ) + 1