0% found this document useful (0 votes)
7 views2 pages

Rotate Array and Count Unique Digits

The document describes two problems involving arrays and integers. The first problem requires cyclically rotating an array clockwise by a given integer K. The second problem involves counting the numbers between two non-negative integers that do not have repeated digits.

Uploaded by

nandhiniec21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Rotate Array and Count Unique Digits

The document describes two problems involving arrays and integers. The first problem requires cyclically rotating an array clockwise by a given integer K. The second problem involves counting the numbers between two non-negative integers that do not have repeated digits.

Uploaded by

nandhiniec21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Problem Description -: Given an array Arr[ ] of N integers and a


positive integer K. The task is to cyclically rotate the array clockwise
by K.

Note : Keep the first of the array unaltered.

Example 1:

 5 —Value of N
 {10, 20, 30, 40, 50} —Element of Arr[ ]
 2 —–Value of K

Output :

40 50 10 20 30

Example 2:

 4 —Value of N
 {10, 20, 30, 40} —Element of Arr[]
 1 —–Value of K

Output :

40 10 20 30

[Link] Description -: Given two non-negative integers n1 and


n2, where n1

For example:

Suppose n1=11 and n2=15.

There is the number 11, which has repeated digits, but 12, 13, 14
and 15 have no repeated digits. So, the output is 4.

Example1:

Input:

 11 — Vlaue of n1
 15 — value of n2

Output:

 4

Example 2:
Input:

 101 — value of n1
 200 — value of n2

Output:

 72

You might also like