0% found this document useful (0 votes)
66 views65 pages

Accenture

Uploaded by

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

Accenture

Uploaded by

21ve1a6799
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 65

Accenture

Accenture Exam Pattern


● Now there will be 3 Rounds in the Accenture Hiring test which have
been divided into 8 sections and after that, there will be an
interview round.
● The initial 7 Sections will consist of 92 Questions. You will have 135
minutes to solve all the questions.
● The last section is the Communication Assessment Test.
● After clearing Accenture Placement Paper 2024 with the required
cut-off, you will be eligible for the Interview Round.
Accenture Exam Pattern
Accenture Basic information

Cognitive Ability 50 Ques

Technical Ability 40 Ques

Coding 2 Ques

Communication Assessment 20-25 Ques

Accenture Basic information

Cognitive Ability 50 Ques

Technical Ability 40 Ques

Coding 2 Ques

Communication Assessment 20-25 Ques


Critical Reasoning:
1. Arrangements
2. Blood Relations
3. Statement & Conclusions
4. Coding Decoding
5. Agree Disagree Psychometric
6. Analogies
7. Inferred Meaning
8. Logical Sequence
Abstract Reasoning:
1. Visual Reasoning
2. Flowcharts-Visual Reasoning-DI
3. Directional Sense
4. Seating Arrangement
Verbal Ability:
● Sentence Correction
● Prepositions
● Grammar
● Reading Comprehension
● Synonyms & Antonym
● Idioms and Phrases
● Speech and Tenses
● Article
● Sentence Selection
● Spotting Error
● Sentence Arrangement
Accenture Common Applications & MS Office :

● MS Office (Word, PowerPoint, Excel, Outlook)


● Browsers' fundamentals
● Shortcut keys
● Command prompt
● Working flow of keys
Accenture Network Security :
● Basics of Networking
● Network Security
● Encryption standards & Algorithms
● Network security devices
● Attack types
● Firewalls
Accenture Cloud :
● Fundamentals of Cloud Computing
● Client server architecture
● Cloud data centres
● Cloud service providers
● Cloud Service Platforms
Accenture Pseudocode :
● Programming Fundamentals
● Looping
● Arrays
● Recursion
● Function
● Bitwise Operators
● Increment & Decrement Operators
● Conditional statements
● Basics of Data Structures
Accenture Coding :
● Basics of Programming
● Input & Output Concepts
● Flow Control
● Conditional Looping
● Arrays
● Functions
● Strings
● Data types & Operators
Q1. There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values).

Before being passed to your function, nums is rotated at an unknown pivot index k (0 <= k < nums.length)
such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-
indexed). For example, [0,1,2,4,4,4,5,6,6,7] might be rotated at pivot index 5 and become
[4,5,6,6,7,0,1,2,4,4].

Given the array nums after the rotation and an integer target, return true if target is in nums, or false if it is
not in nums.

You must decrease the overall operation steps as much as possible.

Example 1:

Input: nums = [2,5,6,0,0,1,2], target = 0

Output: true

Example 2:

Input: nums = [2,5,6,0,0,1,2], target = 3

Output: false

-104 <= target <= 104


Constraints:

1 <= nums.length <= 5000

-104 <= nums[i] <= 104

nums is guaranteed to be rotated at some pivot.

(LeetCode 81)
Q2. Given an m x n matrix, return all elements of the matrix in spiral order.

Input: matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]

Output: [1,2,3,4,8,12,11,10,9,5,6,7]

Constraints:

● m == matrix.length
● n == matrix[i].length
● 1 <= m, n <= 10
● -100 <= matrix[i][j] <= 100

(LeetCode 54)
Adam Number :

Test Case:

Input: 12

Output: Adam Number

Explanation: 12*12=>144

=> 144 =>441

=> square_root(441) => 21

=>21 =>12
Q. Reverse individual words

Test Case 1:

Input : ALL THE BEST

Output: LLA EHT TSEB


Q. print words in Reverse order

Test Case 1:

Input : ALL THE BEST

Output: BEST THE ALL


Amicable pair are two different numbers so related that the sum of the proper divisors of each is equal to the

other number. (A proper divisor of a number is a positive factor of that number other than the number itself.

Given two Numbers A and B, find whether they are Amicable Numbers or not. Print 1 if they are Amicable else 0.

Example 1:

Input:

A = 220 , B = 284

Output: 1

Explanation:

Proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110. Sum of these is
284. Proper divisors of 284 are 1, 2, 4, 71 and 142 with sum 220.
FizzBuzz

FizzBuzz is a childhood game that iterates over a range of numbers and uses simple logic to decide
whether to say a "Fizz,"

Given an integer n, return a string array answer where:

answer[i] == "FizzBuzz" if i is divisible by 3 and 5.

answer[i] == "Fizz" if i is divisible by 3.

answer[i] == "Buzz" if i is divisible by 5.

answer[i] == i (as a string) if none of the above conditions are true.

Example:

Input:

n = 15

Output:

["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]
Given an array and the task is to print the additive primes in an array. Additive primes: Primes such that the sum
of their digits is also a prime, such a

Input Format :The first line of input consists of integer N The next line contains the N integers

Output Format: The output prints the additive primes in the given array Refer to the sample output for
specifications.

Sample Input

2 4 6 11 12 18 7

Sample Output:

2 11 7

Sample Input

14563

Sample Output:

153
Q3.Given an array nums of distinct integers, return all the possible permutations. You can return the
answer in any order.

Example 1:

Input: nums = [1,2,3]

Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

Example 2:

Input: nums = [0,1]

Output: [[0,1],[1,0]]

Constraints:

1 <= nums.length <= 6

-10 <= nums[i] <= 10

All the integers of numbers are unique.

(Leet code 46)


Q4.A permutation of an array of integers is an arrangement of its members into a sequence or linear
order.

For example, for arr = [1,2,3], the following are all the permutations of arr: [1,2,3], [1,3,2], [2, 1, 3],
[2, 3, 1], [3,1,2], [3,2,1].

The next permutation of an array of integers is the next lexicographically greater permutation of its
integer. More formally, if all the permutations of the array are sorted in one container according to
their lexicographical order, then the next permutation of that array is the permutation that follows it
in the sorted container. If such arrangement is not possible, the array must be rearranged as the
lowest possible order (i.e., sorted in ascending order).

For example, the next permutation of arr = [1,2,3] is [1,3,2].

Similarly, the next permutation of arr = [2,3,1] is [3,1,2].

While the next permutation of arr = [3,2,1] is [1,2,3] because [3,2,1] does not have a lexicographical
larger rearrangement.

Given an array of integers nums, find the next permutation of nums.

The replacement must be in place and use only constant extra memory.
Example 1:

Input: nums = [1,2,3]

Output: [1,3,2]

Example 2:

Input: nums = [3,2,1]

Output: [1,2,3]

Constraints:

1 <= nums.length <= 100

0 <= nums[i] <= 100

(LeetCode 31)
Problem Statement :The function accepts two positive
integers ‘r’ and ‘unit’ and a positive integer array ‘arr’ of size
‘n’ as its argument ‘r’ represents the number of rats present
in an area, ‘unit’ is the amount of food each rat consumes
and each ith element of array ‘arr’ represents the amount of
food present in ‘i+1’ house number, where 0 <= i

Note:

● Return -1 if the array is null


● Return 0 if the total amount of food from all houses is not
sufficient for all the rats.
● Computed values lie within the integer range.
Test Case:

Input:
r: 7
unit: 2
n: 8
arr: 2 8 3 5 7 4 1 2

Output:
4
Problem Statement : The Binary number system only uses
two digits, 0 and 1 and number system can be called binary
string. You are required to implement the following function:

int OperationsBinaryString(char* str);

The function accepts a string str as its argument. The string


str consists of binary digits eparated with an alphabet as
follows:

– A denotes AND operation


– B denotes OR operation
– C denotes XOR Operation
You are required to calculate the result of the string str,
scanning the string to right taking one opearation at a time,
Note:

● No order of priorities of operations is required


● Length of str is odd
● If str is NULL or None (in case of Python), return -1

Test Case:
Input:
str: 1C0C1C1A0B1
Output:
1
Problem Statement 3:
You are given a function. int CheckPassword(char str[], int n);
The function accepts string str of size n as an argument.
Implement the function which returns 1 if given string str is
valid password else 0.
str is a valid password if it satisfies the below conditions.

– At least 4 characters
– At least one numeric digit
– At Least one Capital Letter
– Must not have space or slash (/)
– Starting character must not be a number
Assumption:
Input string will not be empty.
Test Case 1:
Input :
aA1_67
Output :
1

Test Case 2:
Input :
a987 abC012

Output :
0
Problem Statement 4:
int findCount(int arr[], int length, int num, int diff);
The function accepts an integer array ‘arr’, its length and two
integer variables ‘num’ and ‘diff’. Implement this function to
find and return the number of elements of ‘arr’ having an
absolute difference of less than or equal to ‘diff’ with ‘num’.

Note: In case there is no element in ‘arr’ whose absolute


difference with ‘num’ is less than or equal to ‘diff’, return -1.
Test Case 1:
Input:
arr: 12 3 14 56 77 13
num: 13
diff: 2
Output:
3

Explanation:
Elements of ‘arr’ having absolute difference of less than or equal to ‘diff’ i.e. 2
with ‘num’ i.e. 13 are 12, 13 and 14.
Problem Statement : Implement the following Function
def differenceofSum(n. m)
The function accepts two integers n, m as arguments Find the
sum of all numbers in range from 1 to m(both inclusive) that
are not divisible by n. Return difference between sum of
integers not divisible by n with sum of numbers divisible by n.

Assumption: n>0 and m>0


Sum lies between integral range
Test Case :
Input
n:4
m:20
Output
90
Explanation :
Sum of numbers divisible by 4 are 4 + 8 + 12 + 16 + 20 = 60
Sum of numbers not divisible by 4 are 1 +2 + 3 + 5 + 6 + 7
+ 9 + 10 + 11 + 13 + 14 + 15 + 17 + 18 + 19 = 150
Difference 150 – 60 = 90
Sample Input
n:3
m:10
Sample Output : 19
Explanation :
Sum of numbers divisible by 4 are 4 + 8 + 12 + 16 + 20 = 60
Sum of numbers not divisible by 4 are 1 +2 + 3 + 5 + 6 + 7
+ 9 + 10 + 11 + 13 + 14 + 15 + 17 + 18 + 19 = 150
Difference 150 – 60 = 90
Sample Input
n:3
m:10
Sample Output : 19
Problem Statement :
You are required to implement the following Function :def
LargeSmallSum(arr)The function accepts an integers arr of
size ’length’ as its arguments you are required to return the
sum of second largest element from the even 6 positions and
second smallest from the odd position of given ‘arr’
Assumption:
● All array elements are unique
● Treat the 0th position as even
NOTE:
● Return 0 if array is empty
● Return 0, if array length is 3 or less than 3
Problem Statement :
You are required to implement the following Function :def
LargeSmallSum(arr)The function accepts an integers arr of
size ’length’ as its arguments you are required to return the
sum of second largest element from the even 6positions and
second smallest from the odd position of given ‘arr’
Assumption:
● All array elements are unique
● Treat the 0th position as even
NOTE:
● Return 0 if array is empty
● Return 0, if array length is 3 or less than 3
Test Case :

Input

arr:3 2 1 7 5 4

Output

7
Explanation :
● Second largest among even position elements(1 3 5) is 3
● Second smallest among odd position element is 4
● Thus output is 3+4 = 7
Input
arr:1 8 0 2 3 5 6
Output
8
Problem Statement :Implement the following Function
def ProductSmallestPair(sum, arr)
The function accepts an integers sum and an integer array
arr of size n. Implement the function to find the pair, (arr[j],
arr[k]) where j!=k, Such that arr[j] and arr[k] are the least
two elements of array (arr[j] + arr[k] <= sum) and return the
product of element of this pair
NOTE
● Return -1 if array is empty or if n<2
● Return 0, if no such pairs found
● All computed values lie within integer range
Test Case :
Input
Sum:9
size of Arr = 7
Arr:5 2 4 3 9 7 1
Output
2
Explanation :
Pair of least two element is (2, 1) 2 + 1 = 3 < 9, Product of
(2, 1) 2*1 = 2. Thus, output is 2
Sample Input
sum:4
size of Arr = 6
Arr:9 8 3 -7 3 9
Sample Output
-21
Problem Statement :N-base notation is a system for writing
numbers that uses only n different symbols, This symbols are
the first n symbols from the given notation list(Including the
symbol for o) Decimal to n base notation are (0:0, 1:1, 2:2,
3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:A,11:B and so on upto
35:Z)
Implement the following function
Char* DectoNBase(int n, int num):
The function accept positive integer n and num Implement
the function to calculate the n-base equivalent of num and
return the same as a string
Steps:
1. Divide the decimal number by n,Treat the division as the
integer division
2. Write the the remainder (in n-base notation)
3. Divide the quotient again by n, Treat the division as
integer division
4. Repeat step 2 and 3 until the quotient is 0
5. The n-base value is the sequence of the remainders from
last to first
Assumption:
1 < n < = 36
Test Case :
Input
n: 12
num: 718
Output
4BA
Explanation:
num Divisor quotient remainder
718 12 59 10(A)
59 12 4 11(B)
4 12 0 4(4)
Sample Input
n: 21
num: 5678
Sample Output
CI8
Problem Statement : Implement the following functions.a
char* MoveHyphen(char str[],int n);
The function accepts a string “str” of length ‘n’, that contains
alphabets and hyphens (-). Implement the function to move
all hyphens(-) in the string to the front of the given string.
NOTE:- Return null if str is null.
Example :-
● Input:
○ str.Move-Hyphens-to-Front
● Output:
○ —MoveHyphenstoFront
Explanation:-
The string “Move-Hyphens -to-front” has 3 hyphens (-), which
are moved to the front of the string, this output is “—
MoveHyphen”
Sample Input
● Str: String-Compare
Sample Output-
● -StringCompare
Problem Statement :
A carry is a digit that is transferred to left if sum of digits
exceeds 9 while adding two numbers from right-to-left one
digit at a time
You are required to implement the following function.
Int NumberOfCarries(int num1 , int num2);
The functions accepts two numbers ‘num1’ and ‘num2’ as its
arguments. You are required to calculate and return the total
number of carries generated while adding digits of two
numbers ‘num1’ and ‘ num2’.
Assumption: num1, num2>=0
Test Case:
● Input
○ Num 1: 451
○ Num 2: 349
● Output
○ 2
Explanation:
Adding ‘num 1’ and ‘num 2’ right-to-left results in 2 carries
since ( 1+9) is 10. 1 is carried and (5+4=1) is 10, again 1 is
carried. Hence 2 is returned.
Sample Input
Num 1: 23
Num 2: 563
Sample Output
0
Problem Statement:
You are given a function,
Void *ReplaceCharacter(Char str[], int n, char ch1, char ch2);
The function accepts a string ‘ str’ of length n and two
characters ‘ch1’ and ‘ch2’ as its arguments . Implement the
function to modify and return the string ‘ str’ in such a way
that all occurrences of ‘ch1’ in original string are replaced by
‘ch2’ and all occurrences of ‘ch2’ in original string are
replaced by ‘ch1’.
Assumption: String Contains only lower-case alphabetical
letters.
Note: 1)Return null if string is null
Test Case:
● Input:
○ Str: apples
○ ch1:a
○ ch2:p
● Output:
○ paales
Explanation:
‘A’ in original string is replaced with ‘p’ and ‘p’ in original
string is replaced with ‘a’, thus output is paales.
Test Case:
● Input:
○ Str: apples
○ ch1:a
○ ch2:p
● Output:
○ paales
Explanation:
‘A’ in original string is replaced with ‘p’ and ‘p’ in original
string is replaced with ‘a’, thus output is paales.
Problem Statement:
You are required to implement the following function.
Int OperationChoices(int c, int n, int a , int b )
The function accepts 3 positive integers ‘a’ , ‘b’ and ‘c ‘ as its
arguments. Implement the function to return.
● ( a+ b ) , if c=1
● ( a – b ) , if c=2
● ( a * b ) , if c=3
● (a / b) , if c =4
Assumption : All operations will result in integer output.
Test Case :
● Input
○ c :1
○ a:12
○ b:16
● Output:
○ Since ‘c’=1 , (12+16) is performed which is equal to
28 , hence 28 is returned.
Test Case :
● Input
○ c :1
○ a:12
○ b:16
● Output:
○ Since ‘c’=1 , (12+16) is performed which is equal to
28 , hence 28 is returned.
Sample Input

c:2

a : 16

b : 20

Sample Output

-4
Problem Statement:You are given a function,
Int MaxExponents (int a , int b);
You have to find and return the number between ‘a’ and ‘b’
( range inclusive on both ends) which has the maximum
exponent of 2.
The algorithm to find the number with maximum exponent of
2 between the given range is
1. Loop between ‘a’ and ‘b’. Let the looping variable be ‘i’.
2. Find the exponent (power) of 2 for each ‘i’ and store the
number with maximum exponent of 2 so faqrd in a
variable , let say ‘max’. Set ‘max’ to ‘i’ only if ‘i’ has more
exponent of 2 than ‘max’.
3. Return ‘max’.
Note: If two or more numbers in the range have the same
exponents of 2 , return the small number.
Test Case :
● Input:
○ 7
○ 12
● Output:
○ 8
Explanation:
Exponents of 2 in:
7-0
8-3
9-0
10-1
11-0
12-2
Hence maximum exponent if two is of 8.
Problem Statement: You are required to implement the
following function:
Int Calculate(int m, int n);
The function accepts 2 positive integer ‘m’ and ‘n’ as its
arguments.You are required to calculate the sum of numbers
divisible both by 3 and 5, between ‘m’ and ‘n’ both inclusive
and return the same.

Note:
0 < m <= n
Test Case :
Input:
m : 12
n : 50
Output
90
Explanation:
The numbers divisible by both 3 and 5, between 12 and 50
both inclusive are {15, 30, 45} and their sum is 90.
Sample Input
m : 100
n : 160
Sample Output
510
Problem Statement :
You are required to input the size of the matrix then the
elements of matrix, then you have to divide the main matrix
in two sub matrices (even and odd) in such a way that
element at 0 index will be considered as even and element at
1st index will be considered as odd and so on. then you have
sort the even and odd matrices in ascending order then print
the sum of second largest number from both the matrices

You might also like