Taking on the 100 days coding challenge! Let's make everyday count!
Given an array we have to find the peak element of the array.
In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put in his new invented basket. Rick has n empty baskets, the ith basket is at position[i], Morty has m balls and needs to distribute the balls into the baskets such that the minimum magnetic force between any two balls is maximum.
A conveyor belt has packages that must be shipped from one port to another within days days. We have to distribure the weights in such a manner that all the days are used and need to find the min load division that uses all the days.
Given an array of integers nums, sort the array in ascending order and return it. You must solve the problem without using any built-in functions in O(nlog(n)) time complexity and with the smallest space complexity possible. The main challenge was to solve this problem with O(nlog(n)) time complexity, so I used Merge sort algo.
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums. You must write an algorithm with O(log n) runtime complexity.
Given the sorted rotated array nums of unique elements, return the minimum element of this array.
Given a positive integer num, return true if num is a perfect square or false otherwise.
Merge nums1 and nums2 into a single array sorted in non-decreasing order.