Skip to content

Creating a Repo for Continuous practice towards Python Exercises and ML Exercises once a week.

Notifications You must be signed in to change notification settings

mishra-atul5001/365-Days-of-Python-and-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

365-Days-of-Python-and-ML

Creating a Repo for Continuous practice towards Python Exercises and ML Exercises once a week.

  • 6 days awesome Python Practice on random logical questions and,
  • 7th Day one ML Use case which can be carries over if needed.
  • Based on my availability and some spare time, will be adding some bonus questions/topics. For example, Sorting in Python/Linked List concept in Python, etc.

Star it/ Fork it and contribute with questions.

For any query/issues, you are welcome to open an issue.

Day 1:

Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits.

Day 2:

Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contain any char.

Day 3:

POSITIVE or NEGATIVE ? If the blood composition of the person is a subsequence of the virus composition V, then the person is identified as POSITIVE otherwise NEGATIVE.

Day 4:

Given a right angled triangle ABC, right angled at B. Find angle ABD, where D is the mid-point of the hypotenuse(side AC).

Day 5:

Given a list of integers prices representing prices of cars for sale, and a budget k, return the maximum number of cars you can buy.

Day 6:

A newly opened multinational brand has decided to base their company logo on the three most common characters in the company name. They are now trying out various combinations of company names and logos based on this condition. Given a string, which is the company name in lowercase letters, your task is to find the top three most common characters in the string.

Day 7:

ML Challenge:

  • Stock Price Prediction
  • Future Predictions
  • Final Results

Day 8:

Longest Consecutive Duplicate String -> Given a lowercase alphabet string s, return the length of the longest substring with same characters.

Day 9:

Palindromic Integer

Day 10:

UGLY NUMBER -> Given an integer n, return whether its prime factors only include 2, 3 or 5.

Day 11:

No Idea! -> There is an array of n integers. There are also 2 disjoint sets,A and B, each containing integers. You like all the integers in set A and dislike all the integers in set B. Your initial happiness is 0. For each i integer in the array, if ,i belongs A you add 1 to your happiness. If i belongs to B, you add -1 to your happiness. Otherwise, your happiness does not change. Output your final happiness at the end.

Day 12:

SUBARRAY DIVISION -> Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it. Lily decides to share a contiguous segment of the bar selected such that:

The length of the segment matches Ron's birth month, and,
The sum of the integers on the squares is equal to his birth day.

Determine how many ways she can divide the chocolate.

Day 13:

BILL DIVISION -> Two friends Anna and Brian, are deciding how to split the bill at a dinner. Each will only pay for the items they consume. Brian gets the check and calculates Anna's portion. You must determine if his calculation is correct.

For example, assume the bill has the following prices: bill = [2,4,6]. Anna declines to eat item k = bill[2] which costs 6. If Brian calculates the bill correctly, Anna will pay (2+4)/2=3. If he includes the cost of bill[2], he will calculate (2+4+2)/2=6. In the second case, he should refund to 3 Anna.

Day 14:

Netflix Dataset

Day 15:

Electronics Shop -> A person wants to determine the most expensive computer keyboard and USB drive that can be purchased with a give budget. Given price lists for keyboards and USB drives and a budget, find the cost to buy them. If it is not possible to buy both items, return -1.

Day 16:

Designer PDF Viewer -> When a contiguous block of text is selected in a PDF viewer, the selection is highlighted with a blue rectangle. In this PDF viewer, each word is highlighted independently.

Day 17:

Save the Prisoner! -> A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides the fairest way to divide the treats is to seat the prisoners around a circular table in sequentially numbered chairs. A chair number will be drawn from a hat. Beginning with the prisoner in that chair, one candy will be handed to each prisoner sequentially around the table until all have been distributed.

Day 18:

Remove all consecutive duplicates from the string

Day 19:

Drawing Book -> A teacher asks the class to open their books to a page number. A student can either start turning pages from the front of the book or from the back of the book. They always turn pages one at a time. When they open the book, page 1 is always on the right side. Given n and p, find and print the minimum number of pages that must be turned in order to arrive at page p.

Day 20:

The Stolen Breakfast Drone -> Given the list of IDs, which contains many duplicate integers and one unique integer, find the unique integer.

Day 21:

Beautiful Days at the Movies -> Given a range of numbered days [i.....j], and a number k, determine the number of days in the range that are beautiful. Beautiful numbers are defined as numbers where |i - reverse(i)| is evenly divisible by k. If a day's value is a beautiful number, it is a beautiful day. Return the number of beautiful days in the range.

Day 22:

Picking Numbers -> Given an array of integers, find the longest subarray where the absolute difference between any two elements is less than or equal to 1.

Day 23:

Climbing the Leaderboard

Day 24:

Utopian Tree -> The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. Each summer, its height increases by 1 meter. A Utopian Tree sapling with a height of 1 meter is planted at the onset of spring. How tall will the tree be after n growth cycles?

Day 25:

Viral Advertising -> HackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly 5 people on social media.

  • On the first day, half of those 5 people (i.e., floor(5/2) = 2 ) like the advertisement and each shares it with 3 of their friends. At the beginning of the second day,floor(5/2)3 = 6 people receive the advertisement.
  • Each day, floor(reciepents/2) of the recipients like the advertisement and will share it with 3 friends on the following day.
    Assuming nobody receives the advertisement twice, determine how many people have liked the ad by the end of a given day, beginning with launch day as day 1.

Day 26:

Circular Array Rotation

Day 27:

BINARY GAP -> Find the longest subsequence of zeros in binary respresentation of an integer.

Day 28:

CyclicRotation -> Rotate an array to the right by a given number of steps.

Day 29:

PermMissingElem -> Find the missing element in a given permutation.

Day 30:

TapeEquilibrium

Day 31:

FrogRiverOne -> A small frog wants to get to the other side of a river. The frog is initially located on one bank of the river (position 0) and wants to get to the opposite bank (position X+1). Leaves fall from a tree onto the surface of the river.

Day 32:

PermCheck

Day 33:

CountDiv

Day 34:

Passing Cars -> Counting the number of PAIRS based on EAST/WEST cars directions

Day 35:

Finding Digits -> Given an integer, for each digit that makes up the integer determine whether it is a divisor. Count the number of divisors occurring within the integer.

Day 36:

Extra Long Factorials -> Calculate and print the factorial of a given integer.

Day 37:

Append and Delete

Day 38:

Min Avg Two Slice -> https://app.codility.com/programmers/lessons/5-prefix_sums/min_avg_two_slice/

Day 39:

MaxProductOfThree -> A non-empty array A consisting of N integers is given. The product of triplet (P, Q, R) equates to A[P] x A[Q] x A[R] (0 ≤ P < Q < R < N).

Day 40:

TRIANGLE

Day 41:

Brackets

Day 42:

Nested Brackets

Day 43:

Fish Survival -> https://app.codility.com/programmers/lessons/7-stacks_and_queues/fish/

Day 44:

Stone Wall -> https://app.codility.com/programmers/lessons/7-stacks_and_queues/stone_wall/

Day 45:

Coming Soon

Day 46:

Demonstrating Multi-processing in Python

Day 47:

Coming Soon

Day 48:

Coming Soon

Day 49:

Coming Soon

Day 50:

Coming Soon

About

Creating a Repo for Continuous practice towards Python Exercises and ML Exercises once a week.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published