Please help to solve this problem

Revision en1, by 1_Hypex_, 2023-11-10 09:04:23

Given an array of positive integers nums of length N, we need to find the maximum sum of two integers that do not have any common digit between them.

1<=N<=2e5 1<=nums[i]<=1e9

Eg. N = 6 nums = 53 1 36 103 53 5 ans = 103+5 = 108

This question was asked as part of Microsoft Online Assessment

Tags array, number, optimization

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 1_Hypex_ 2023-11-10 09:04:23 333 Initial revision (published)