Devops Assignment - Atmana
Devops Assignment - Atmana
Devops Assignment - Atmana
2. You are given a sorted array of integers. Each element in the array occurs
2 times expect one element. Find the element that occurs just once in the
array in just O(logN) time and O(1) extra space.
Sample Input 1:
Array = 1,1,2,2,3,4,4
Output Input 1:
Sample Input 2:
Y = 3, S = ab
Sample Output:
76
N = 85
Sample Output 1: 2
Sample Input 2:
N = 114
Sample Output 2: 4
5. Rahul recently visited Atmana’s Cafe and was highly impressed by the
food. Being a food enthusiast, he decided to enquire about the ingredients
of each dish. There are N dishes represented by strings S1,S2,…,SN.
Each ingredient used for making dishes in Atmana’s Cafe is represented
by a lowercase English letter. For each valid i, the ingredients used to
make dish i correspond to characters in the string Si (note that ingredients
may be used multiple times). A special ingredient is an ingredient which
is present in each dish at least once. Chef wants to know the number of
special ingredients in Atmana's Cafe. Since Chef is too busy with work,
can you help him?
Sample Input 1:
N=3
S1 = abcaa, S2 = bcbd, S3 = bgc
Sample Output: 2
Sample Input 2:
N=3
S1 = quick, S2 = brown, S3 = fox
Sample Output: 0
6. You are given with a list of words. For each word in a list, if any two
adjacent characters are equal, change one of them to any random
character. Determine the minimum number of substitutions so the final
string contains no adjacent equal characters.
Sample Input 1:
['add', 'boook', 'break']
Sample Output 2:
[1,1,0]
Explanation:
'add': change one d (1 change)
'boook': change the middle o (1 change)
'break': no changes are necessary (0 changes)
7. Scenario:
a. You need to install and setup docker on 10 ec2 instances, IP of those instances
are already known.
b. You also need to create a user called “deploybot” on each host, and that user
should be able to run all docker commands without using sudo
c. Question
i. What tools you will use, write and describe tools you choose, and a
working script/solution which when executed perform above 2 tasks
8. Scenario:
a. You are given admin access to one AWS account which runs production
workloads
b. Question
i. What all steps you will review to ensure account and its services are
running securely
9. Scenario
a. Using the sample logs from
https://raw.githubusercontent.com/elastic/examples/master/Common%20Data
%20Formats/apache_logs/apache_logs
b. Question:
i. List out count of all status codes, output syntax doesn’t matter
1. {'200': 9125, '304': 445, '404': 213, '301': 164, '206': 45, '500': 3,
'403': 2, '416': 2}
ii. List top 3 IP which are making requests