Mimimum Index Sum
Task
You are given two arrays of strings.
Write a script to find out all common strings in the given two arrays with minimum index sum. If no common strings found returns an empty list.
Solution
|
|
Discussion
Zip Metaoperator combined with the fat comma operator.
Duplicate and Missing
Task
You are given an array of integers in sequence with one missing and one duplicate.
Write a script to find the duplicate and missing integer in the given array. Return -1 if none found.
For the sake of this task, let us assume the array contains no more than one duplicate and missing.
Solution
|
|