TCS wings1 DCA python coding
TCS elevate wings1 coding questions
This post contains only coding questions asked in TCS digital wings1 or tcs elevate wings1 exam.
If anyone want coding answer of these questions please comment me or reach me through email provided.
Find how many Sexy Prime Numbers in a given range k and p.
Sexy prime means the prime numbers that differ from each other by 6.
Where difference between two sexy prime numbers is 6.
Constraint: 2 <=p<k<= 1000,000,000.
Sample Input:
4 40
Output:
7
Explanation:
[5,11]
[7,13]
[11,17]
[13,19]
[17,23]
[23,29]
[31,37]
Problem 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
Consider the string S1 = 321 All characters and contiguous characters from the above string are {3,2,1,32,21,321} By adding all the numbers, we will get 3+2+1+32+21+321=380
Example 1:
Input:
321
Output:
380
Example 2:
Input:
12
Output: 15
A faulty program stores values from the username and password fields as a continuous sequence of characters When trying to fetch either the user name or password, the entire string is displayed. Given the string str, the task here is to find and extract only the letters and special characters from the whole string stored.
Note: The letters and special charact should be displayed separately Dislike The output should consist of all the letters folved by all the special characters present in the input string
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
If you want TCS DCA Coding Questions and Answers mail me.
Comments