Mera 9 August 2024 m exam tha ..or mera cognitive assessment clear b ho gya .... Pr coding round k liye login hi nahi hua ... M kya karun ab... please help me
00:03 Discussing coding questions from 9th August Accenture Assessment Test slot 1 02:01 Identifying the peak element in ascending-descending arrays 03:52 Identifying peak elements in ascending and descending arrays 05:42 Identifying peak element in array based on surrounding elements 07:31 Identifying peak element in an array with ascending order 09:16 Discussed logic for identifying the peak element in an array 11:00 The peak of the array is discussed with ascending and descending arrays. 12:52 Repetition coding question strategy Crafted by Merlin AI.
@Devaratha6823but sir give the solution it's also take O(n) complexity ,u may say that at some time edge case reduce the complexity but the overall is O(n)
Please tell me if we have to write the code from scratch or just write the function in coding round ? Pls clarify I am confused because on some sites they are saying that you have to write from scratch..
#include using namespace std; int peakaddress(int arr[],int n){ int temp=arr[0]; for(int i=1;itemp){ temp=arr[i]; } } return temp; } int main(){ int n; cin>>n; int arr[n]; for(int i=0;i>arr[i]; } cout
Hi, can you please reply? Can I use Python built-in methods in the Accenture exam? Are built-in methods allowed? Example : reverse(), find(), index() ect.....
*This might be helpful for those who are searching for this question in python.* def peak(n,arr): for i in range(len(arr)-1): if arr[i]>arr[i+1]: print(arr[i]) break
✅✅Join Our Telegram Group for Accenture 2025 Batch Discussion : t.me/placement_batch_2025
✅✅Important IT Interview Subject Notes: topmate.io/code_bashers/1026390
return max(arr)💀
that correct😂
It can be solved using largest element or simply sorting array
sir can we do like this
def get_peek(nums):
a,b=0,1
while b nums[b]:
return nums[a]
break
else:
a+=1
b+=1
This might be simple
def peak(n,arr):
for i in range(len(arr)-1):
if arr[i]>arr[i+1]:
print(arr[i])
break
Can we solve this by largest element ..?
Sir how many questions do we need to solve in Accenture coding assessment
yes
2 questions 😂are very easy ig no need of preparation
Mera 9 August 2024 m exam tha ..or mera cognitive assessment clear b ho gya .... Pr coding round k liye login hi nahi hua ...
M kya karun ab... please help me
00:03 Discussing coding questions from 9th August Accenture Assessment Test slot 1
02:01 Identifying the peak element in ascending-descending arrays
03:52 Identifying peak elements in ascending and descending arrays
05:42 Identifying peak element in array based on surrounding elements
07:31 Identifying peak element in an array with ascending order
09:16 Discussed logic for identifying the peak element in an array
11:00 The peak of the array is discussed with ascending and descending arrays.
12:52 Repetition coding question strategy
Crafted by Merlin AI.
Please tell other programming languages like java
This can be simply done by finding the largest element . Isn't it?
even I got this idea..
@Devaratha6823 we should go less than bigO(n)
exactly
@Devaratha6823but sir give the solution it's also take O(n) complexity ,u may say that at some time edge case reduce the complexity but the overall is O(n)
@Devaratha6823just use binary search tc will reduce to Logn
What if we max of the list
max[1,2,3,4,3,2,1]
Binary search
Please tell me if we have to write the code from scratch or just write the function in coding round ? Pls clarify I am confused because on some sites they are saying that you have to write from scratch..
Just implement the function
#include
using namespace std;
int peakaddress(int arr[],int n){
int temp=arr[0];
for(int i=1;itemp){
temp=arr[i];
}
}
return temp;
}
int main(){
int n;
cin>>n;
int arr[n];
for(int i=0;i>arr[i];
}
cout
What if there are only two values in an array then peak doesn't form right
return *max_element(arr,arr+n);
Hi, can you please reply?
Can I use Python built-in methods in the Accenture exam? Are built-in methods allowed?
Example : reverse(), find(), index() ect.....
Yesss
We can use BS in this question
But BS uses for finding index of specific element.how will you use it here.
This is on campus exam or off
Send more videos
Uploading in few minutes 🙂
Ye to bahut easy hai
Yes bro , totally depends on slot
we can actually do it by many ways but what if we just do Arrays.sort(arr) return arr[arr.length-1]; 😂😂
No we can't do like that...tc will be O(nlogn)...we can do it in Binary search for tc will be logn
@@SahilVanarse-n4x ofc I do know!! I am just saying that it can be solved in simple 2 lines 😂
@@sourajitakar840 Apply Upper_Bound Theory in Binary Search
it can be also solved by using max function
@@AbhaySingh-uq7lx much better😂😂
is it on campus questions
No off campus
@@CodeBashers is Accenture hiring for 2025 batch through off campus?.....if not then when will it most likely to start off campus hiring?
@@sonamsingh7284 no , oncampus.24 batch off campus
Is it real
Yes bro , why u asked
*This might be helpful for those who are searching for this question in python.*
def peak(n,arr):
for i in range(len(arr)-1):
if arr[i]>arr[i+1]:
print(arr[i])
break
Can we solve this by largest element ..?