Sort by

recency

|

131 Discussions

|

  • + 0 comments

    scala = arr.lastIndexOf(arr.last) + 1

  • + 0 comments

    Counting elements without count is like diving into xxbrits, it's all about understanding without shortcuts!

  • + 0 comments

    Scala: (for (_ <- arr) yield 1).sum

  • + 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