Maximizing Unique Elements in Set
You have two strings, each containing an even number of digits(0-9), called "nums1" and "nums2".
Your task is to select exactly half of the digits from "nums1" and half of the digits from "nums2". Then, you combine the selected digits and insert them into a set called "s".
Your goal is to maximize the number of unique elements in the set "s" and print the size of the set.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)