Accenture Accenture OA-30 2024 Problem Description You are given a function checkPassword (char str[] , int n) : Return 1 if it is a valid password else return 0 if it is not. String is a valid password if it satisfies the following conditions: * At least 4 characters. * At least 1 numeric. * At least one capital
Accenture Accenture OA-29 2024 Problem Description Alex gives you a positive number N and wants you to rearrange the bits of the number in its binary representation such that all set bits are in consecutive order. Your task is to find and return an integer value representing the minimum possible number that can be
Accenture Accenture OA-28 2024 Problem Description Let j and k be two indices in an array A. If j < k and A[j] > A[k], then the pair (j,k) is known as an "Inversion pair". You are required to implement the following function: int InversionCount(int *A, int n)
Accenture Accenture OA-27 2024 Problem Description Mr. Professor is a great scientist, but he is not able to find a solution to one problem. There are N straight lines that are not parallel, and no three lines go through the same point. The lines divide the plane into M regions. Write a function to
Accenture Accenture OA-26 2024 Problem Description It is Edward's birthday today. His friends have bought him a huge circular cake. Edward wants to find out the maximum number of pieces he can get by making exactly N straight vertical cuts on the cake. Your task is to write a function that returns
Accenture Accenture OA-25 2024 Problem Description An odd number is an integer which is not a multiple of 2. You are required to implement the following function: Int SumOddlntegers(int arr[], int n); The function accepts an integer array 'arr' of length 'n' as its argument. You are required to
Accenture Accenture OA-24 2024 Problem Description You are given a program to find the count of magical numbers from 1 to N. A magical number is defined by the following criteria: 1. Convert to Binary: Convert each number in the range 1 to N (inclusive) to its binary representation. 2. Replace Digits: Replace '
Accenture Accenture OA-23 2024 Problem Description You are working on a financial analyzing tool which represents the daily stock prices of a company over a time. Each element in an integer array A of size N represents the closing price of the stock for a particular day. Your task is to find and return
Accenture Accenture OA-22 2024 Problem Description Two players, A and B, are playing the game of Rock, Paper, Scissors. Player A chooses a move represented by a string value M, which can be one of the following: 'rock', 'paper', or 'scissors'. The rules of the game are: * rock
Accenture Accenture OA-21 2024 Problem Description You are in charge of a convoy of N vehicles, each with a fuel meter showing the fuel present in each vehicle in liters. Each vehicle needs to travel a distance of X kilometers. If the fuel becomes empty before reaching X kilometers, the vehicle can refuel but
Accenture Accenture OA-20 2024 Problem Description You are given an integer array of size N, representing jars of chocolates. Three students A, B, and C, will pick chocolates one by one from each chocolate jar, till the jar is empty, and then repeat the same with the rest of the jars. Your task is
Accenture Accenture OA-19 2024 Problem Description You are given an integer array A of length N. Your task is to find and return an integer value representing the count of unique pairs whose product is a multiple of 3. Note: A Unique pair means that the elements must be the same regardless of their
Accenture Accenture OA-18 2024 Problem Description In a tech startup, the team faced a software bug - the zeros in their data outputs were causing their system to crash. A junior developer suggested replacing all the 0's with 5's as a quick fix. By implementing this simple code tweak, they
Accenture Accenture OA-17 2024 Problem Description You are planning a picnic for a group of friends who love math. To make it interesting, you decided to bring a unique number of items, N. Your task is to find and return an integer value representing the sum of all the prime numbers till N. In
Accenture Accenture OA-16 2024 Problem Description You are on a hiking trail represented by an array A of length N, where the trail initially ascends and then descends, forming a single peak. Your task is to find and return an integer value representing the elevation of the summit. Input Format: * Input1: An integer array
Accenture Accenture OA-15 2024 Problem Description Your friend has made an entry of a name in the form of first name F and last name L in your contact list. However, some letters in the names are in uppercase while others are in lowercase. Your task is to format the names such that the
Accenture Accenture OA-14 2024 Problem Description You are stuck on an island where they sell and eat coconut sweets only. A person can buy at most 1 box per day with each box containing N pieces. To remain alive, you must consume E coconut sweets daily for D days, but the catch is that
Accenture Accenture OA-13 2024 Problem Description You are developing a feature for an environmental awareness app that helps users to know how much area their tree's shadow covers. You have the distance D from a tree's trunk to the edge of the shadow. Your task is to calculate and return
Accenture Accenture OA-12 2024 Problem Description A poet has asked for assistance in writing poems. He has given you a string S and a dictionary D. Your task is to find, from the dictionary, a word which rhymes best with S. Words are said to rhyme when the last syllables of the words are
Accenture Accenture OA-11 2024 Problem Description Bob goes to a supermarket to buy candies represented by an array A for a Halloween party. His mother gave him M amount of money. Due to the festive season, there are several offers in the supermarket. One such offer useful for Bob is, if the price of
Accenture Accenture OA-10 2024 Problem Description Jack has an array A of length N. He wants to label whether the number in the array is even or odd. Your task is to help him find and return a string with labels "even" or "odd" in sequence according to which the
Accenture Accenture OA-9 2024 Problem Description You are given a string array S that contains the names of some files along with their versions. Your task is to find and return the latest version out of all the files that are correctly named in the array. A file is considered correct if it follows
Accenture Accenture OA-8 2024 Problem Description Ian has been given an array A of length N. He wants to find the sum of elements at even positions after reversing the array. Your task is to help him find and return an integer value representing the sum of the array elements present at even positions
Accenture Accenture OA-7 2024 Problem Description You are given a string array of length N . Your task is to find and return an integer value representing the maximum permutation count of the strings after removing all the vowels from every element in the string array. Notes: * If a string has no permutable characters (all
Accenture Accenture OA-6 2024 Problem Description Alex is exploring a series and she came across a special series in which * f(N) = f(N-1) * f(N-1) + f(N-2) * f(N-2) * where, f(0) = 1 and f(1) = 1 Your task is to help Alex find and return an integer value representing the Nth number