#array

[ follow ]
Alvinalexander
2 months ago
Scala

How to convert a Scala Array/List/Seq (sequence) to string with mkString

Using mkString method of Array class can convert Scala sequence (like Array, List, Seq) to a String.
mkString function can be customized with any separator string to format the output as desired. [ more ]
medium.com
4 months ago
Scala

Two pointers technique: Merge Sorted Arrays

The two pointers technique can be used to efficiently solve various problems such as finding a pair in an array, checking for palindromes, detecting a cycle in a linked list, traversing a matrix, implementing the sliding window technique, and removing duplicates.
Leetcode 88. Merge Sorted Array is an example of a problem that can be solved using the two pointers technique. [ more ]
[ Load more ]