harsh12panghal / 100DaysOfCode

Taking on the 100 days coding challenge! Let's make everyday count!
0 stars 1 forks source link

100DaysOfCode

Taking on the 100 days coding challenge! Let's make everyday count!

Day 1

Given an array we have to find the peak element of the array.

Day 2

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.

Day 3

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.

Day 4

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.

Day 5

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.

Day 6

Given the sorted rotated array nums of unique elements, return the minimum element of this array.

Day 7

Given a positive integer num, return true if num is a perfect square or false otherwise.

Day 8

Merge nums1 and nums2 into a single array sorted in non-decreasing order.