Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .

0 like 0 dislike
2,832 views
in Online Assessments by Expert (32,020 points)

1 Answer

0 like 0 dislike
Recently i appeared for Deloitte Assesment and this coding question felt nearly impossible please if someone could guide an approach
You are given with two integers N and D find all the N digit Prime Numbers having D as their most frequent digit. E.g. if N=2 and D=3 so we have to find 2 digit integers having 3 as the most frequent digit so answer will be [13,23,31,37,43,53,73,83] as these contain 3 as the most frequent digit

 

Constraint for D is 1<=D<=9
Constraint for N is 0<=N<= 10^18

 

10^18 digits how would you do that i have this doubt
by Expert (32,020 points)
...