Menu ---
coderinme
  • Programming
    • C
    • C++
    • Java
    • Apex
    • File Handling
    • Python
    • Bash
    • PHP
  • Algorithm
    • Higher Order Thinking Skills Questions
    • Pointer
  • Data Structure
    • Array
    • Linked List
    • Tree
    • Stack
    • Queue
  • Competitive
    • Hackerrank
    • Hackerearth
  • Companies Tech
    • ThoughtWorks
    • NEC Tech
    • TCS
  • Database
    • Data Base and SQL
  • SFDC
    • More
    • Assignment
    • Videos
Menu ---
  • Programming
    • C
    • C++
    • Java
    • Apex
    • File Handling
    • Python
    • Bash
    • PHP
  • Algorithm
    • Higher Order Thinking Skills Questions
    • Pointer
  • Data Structure
    • Array
    • Linked List
    • Tree
    • Stack
    • Queue
  • Competitive
    • Hackerrank
    • Hackerearth
  • Companies Tech
    • ThoughtWorks
    • NEC Tech
    • TCS
  • Database
    • Data Base and SQL
  • SFDC
    • More
    • Assignment
    • Videos

Coder in Me.

Learn coding & Play with it

Home » Programming » Python

Category: Python

The Hurdle Race Hackerrank Problem Solution- Coder In Me

In C++, Hackerrank, Java, PythonMay 6, 2018 hasectic

Dan is playing a video game in which his character competes in The Hurdle Race. Hurdles are of varying heights, and Dan has a maximum height he can jump. There is a magic potion he can take that will increase his maximum height by 1 unit for each dose. How many doses of the potion must he take to be able to jump all of the hurdles? Given an array of hurdle heights h, and an initial maximum height Dan …

Continue Reading

Forming a Magic Square HackerRank Solution – Coder In Me

In C++, Hackerrank, PythonMay 5, 2018 hasectic

We define a magic square to be a matrix of distinct positive integers from 1 to n2 where the sum of any row, column, or diagonal of length n  is always equal to the same number: the magic constant.You will be given a 3 X 3 matrix s of integers in the inclusive range [1,9]. We can convert any digit a to any other digit b in the range  [1,9] at cost of |a-b|. For this Problem Forming a Magic Square Given s, convert it into a magic square at minimal cost. Print this cost on a new line.Note: The …

Continue Reading

Ice Cream Parlor Hackerrank problem solution

In C++, Competitive, Hackerrank, Java, PythonMay 3, 2018 hasectic

Ice Cream Parlor Hackerrank Each time Sunny and Johnny take a trip to the Ice Cream Parlor, they pool together m dollars for ice cream. On any given day, the parlor offers a line of n flavors. Each flavor, i, is numbered sequentially with a unique ID number from 1 to n and has a cost, ci, associated with it. Given the value of m and the cost of each flavor for t trips to the Ice Cream Parlor, help …

Continue Reading

Pairs Hackerrank problem solution

In C, C++, Competitive, Hackerrank, Java, PythonMarch 5, 2018 hasectic

Given N integers, count the number of pairs of integers whose difference is K. Input Format The first line contains N and K. The second line contains N numbers of the set. All the N numbers are unique. Constraints 2<=N<=105 0<=K<=109 Each integer will be greater than 0 and at least K smaller than 231-1. Output Format An integer that tells the number of pairs of integers whose difference is K. <strong>Sample Input</strong> 5 2 1 5 3 4 2 …

Continue Reading

Grading Students Hackerrank problem solution -coderInme

In C++, Hackerrank, Java, PythonMarch 4, 2018 hasectic

At HackerLand University, a passing grade is any grade 40 points or higher on a 100 point scale. Sam is a professor at the university and likes to round each student’s grade according to the following rules: If the difference between the grade and the next higher multiple of 5 is less than 3, round to the next higher multiple of 5 If the grade is less than 38, don’t bother as it’s still a failing grade Automate the rounding …

Continue Reading

Birthday Cake Candles Hackerrank problem solution -coderInme

In C++, Hackerrank, Java, PythonMarch 4, 2018 hasectic

Birthday Cake Candles Hackerrank problem solution -coderInme You are in-charge of the cake for your niece’s birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones. Your task is to find out how many candles she can successfully blow out. For example, if your niece is turning 4 years old, and the cake will have 4 candles of height 3, 2, 1, 3, she …

Continue Reading

Angry Professor Hackerrank problem solution- Coderinme

In C++, Competitive, Hackerrank, Java, PythonFebruary 20, 2018 hasectic

Angry Professor Hackerrank A Discrete Mathematics professor has a class of N students. Frustrated with their lack of discipline, he decides to cancel class if fewer than K students are present when class starts. Given the arrival time of each student, determine if the class is canceled. Input Format The first line of input contains T, the number of test cases. Each test case consists of two lines. The first line has two space-separated integers, N(students in the class) and …

Continue Reading
Older Posts

Site Sidebar

Code Blog

Blog of Coder In Me

Code Division

  • Algorithm
  • Apex
  • Array
  • Assignment
  • Bash
  • C
  • C++
  • Companies Tech
  • Competitive
  • Data Base and SQL
  • Data Structure
  • Database
  • File Handling
  • graph
  • Hackerearth
  • Hackerrank
  • HOTS
  • Java
  • Javascript
  • Linked List
  • More
  • NEC Tech
  • PHP
  • PHP
  • Pointer
  • Programming
  • Project
  • Python
  • Queue
  • SFDC
  • Stack
  • TCS
  • ThoughtWorks
  • Tree
  • Trigger
  • VisualForce Page

Recent Posts

  • SOQL And SOSL in Apex in Salesforce
  • Deep Diving in Salesforce Triggers IV – Coderinme
  • Deep Diving in Triggers #Post 3
  • Deep Diving in Salesforce Triggers II – Coderinme
  • All about Salesforce Apex at one place – Coder in Me

Recent Comments

  • hasectic on Tree : Top View Hackerrank problem solution
  • raj on Tree : Top View Hackerrank problem solution
  • Anonymous on Service Lane Hackerrank problem solution
  • Aanchal Rawat on Equalize the Array Hackerrank problem solution
  • Anonymous on Balanced Brackets Hackerrank problem solution

Site Footer

About Coder In Me

About Coder In Me

Coderinme is the platform where you can learn the basic coding and programming in C , C++, Java, Python,PHP,Shell, MySQL. To evaluate you, Coderinme also provides the Assignment Questions, HOTS(hoigher order thinking skills) Questions.

Monthly Diary

  • November 2019 (1)
  • October 2019 (1)
  • September 2019 (4)
  • January 2019 (3)
  • December 2018 (2)
  • October 2018 (1)
  • September 2018 (1)
  • August 2018 (2)
  • July 2018 (1)
  • May 2018 (11)
  • March 2018 (6)
  • February 2018 (17)
  • January 2018 (8)
  • December 2017 (19)
  • November 2017 (17)
  • October 2017 (11)
  • September 2017 (12)
  • August 2017 (24)
  • July 2017 (11)
  • June 2017 (4)
  • May 2017 (7)
  • April 2017 (1)
  • March 2017 (6)
  • February 2017 (21)
  • January 2017 (32)
  • December 2016 (4)
  • November 2016 (5)
  • October 2016 (139)

Snapshots

  • About Us
  • Contact Us
  • Videos
  • Higher Order Thinking Skills Questions
  • Terms of Use
  • Privacy Policy
  • Coderinme what and how to use?

Code Blog

Blog of Coder In Me
© Coder in Me 2016-17 coderinme.com