MY Mission To Make Top Most Organization
- π± Iβm currently learning Computer Science & Production - π― Iβm looking to collaborate on opensource and educational Projects - π¬ Ask me about Web & App Dev , Opensource , Technology - π« How to reach me: Email , Instagram , Twitter - π Pronouns: HE - β‘ Fun fact: Nothing π
|
|
|
Dart Arduino HTML Figma PHP Firebase Google Cloud Flutter CSS
eg: [1,2,3,4,-3,-2,6,-7,9] output: [-3,-2,-7,1,2,3,4,6,9]
Hint: Create two ArrayList and add negetive numbers in one array and +ve no in other arrray and add them together in the way of required
Video
source of code:
eg : arr={0,2,1,2,0,1,2,1,2,1};
output: [0,0,1,1,1,1,2,2,2,2];
Hint : We can solve this problem in two different ways
1-> count the number of 0, 1, 2's
2-> by sliding window
Video
source of code:
eg : the given array is
array= {32,3,4,5,5,6,7,374,7894,584,50};
Output :584
Hint :
there are so many wa to slove this question but one of the most optimal solution is to time compexity of given problem this the main task to do.
1-optimal Solution-> First find the higest value from given array and then find the second higest value from given array .
Video Optimal Solution: With written Notes
Given a sorted array of size N and an integer K, find the position at which K is present in the array using binary search.
eg :{1,2 3,4 5,6,7,20,100}; v=4
Condition: The given array should be sorted
Hint : two pointer approch -> and find middle position check whether it is High or low given value. if it is low it that means the given value is present in between of the last position and middle position.
task: Main task to reduce the time complexity.
Video
Optimal Solution: With written Notes
You have given array and you should have to finad first repatated value from the given array eg : array={2,3,45,2,4,6}; Output: 2
Video Optimal Solution: With written Notes