math homework hackerrank solution in python

Martin Kysel

Coding Challenges and More

HackerRank 'Lily's Homework' Solution

Martin Kysel · September 21, 2018

Short Problem Definition:

Whenever George asks Lily to hang out, she’s busy doing homework. George wants to help her finish it faster, but he’s in over his head! Can you help George understand Lily’s homework so she can hang out with him?

Consider an array of m distinct integers, arr = [a[0], a[1], …, a[n-1]]. George can swap any two elements of the array any number of times. An array is if the sum of a[i] - a[i-1] among 0 < i < n is minimal.

Lily’s Homework

Complexity:

time complexity is O(N\*log(N))

space complexity is O(N)

Let us rephrase the problem to a sorting problem: Find the number of swaps to make the array sorted. We need to consider both ascending and descending arrays. The solution assumes no duplicates.

Share: Twitter , Facebook

To learn more about solving Coding Challenges in Python, I recommend these courses: Educative.io Python Algorithms , Educative.io Python Coding Interview .

Hackerrank Solution: Find Angle MBC in Python [4 Methods]

August 14, 2022

Hacker Rank Python

Question: Find Angle MBC - Hacker Rank (Python)

find-angle

ABC  is a right triangle,  90 o  at  B . Therefore,  angle ABC  =  90 o . Point  M  is the midpoint of hypotenuse  AC .

You are given the lengths  AB  and  BC . Your task is to find the angle  MBC  in degrees.

Input format:

The first line contains the length of side  AB . The second line contains the length of side  BC .

Constraints:

  • 0 < AB <= 100
  • 0 < BC <= 100
  • Lengths  AB  and  BC  are natural numbers.

Output format:

Output  angle MBC  in degrees.

Note:  Round the angle to the nearest integer.

Examples : If angle is 56.5000001°, then output  57° . If angle is 56.5000000°, then output  57° . If angle is 56.4999999°, then output  56° .

Sample input:

Possible solutions

As we will be provided by the sides and then we have to find the angle. For this question, we can come up with multiple solutions.

  • Using math module
  • Using math module: Alternative solution
  • Using math module with fewer lines of code
  • Alternative solution

Solution-1: Using math module

The math module is a standard module in Python and is always available. To use mathematical functions under this module, you have to import the module using import math. Let us import the math module and find the angle using the given sides of the triangle.

As you can see, we get the 45-degree angle as required.

Solution-2: Using a math module: Alternative solution

Now, we will transform the above code into fewer lines as an alternative solution shown below:

As you can see, we get 45 degrees which was required in the sample.

Solution-3: Using Math module with fewer lines

We can even reduce the number of lines to make our code more optimized and readable.

As you can see, we were able to get the same result using fewer lines of code.

Solution-4: Alternative Solution

Now, we will use another simple method to calculate the angle.

The char(176) in the code represents the degree sign.

As we were supposed to find the angle of a triangle when the sides were given. In this short article, we come up with multiple solutions to solve the  FIND ANGLE question from Hacker Rank.

Python math Question on Hacker rank: Find Angle MBC in Python

Related Keywords: hackerrank find angle mbc solution in python, hackerrank find angle mbc solution in python3, 1find angle mbc hackerrank solution

Bashir Alam

Bashir Alam

He is a Computer Science graduate from the University of Central Asia, currently employed as a full-time Machine Learning Engineer at uExel. His expertise lies in Python, Java, Machine Learning, OCR, text extraction, data preprocessing, and predictive models. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to [email protected]

Thank You for your support!!

Leave a Comment Cancel reply

Save my name and email in this browser for the next time I comment.

Notify me via e-mail if anyone answers my comment.

math homework hackerrank solution in python

We try to offer easy-to-follow guides and tips on various topics such as Linux, Cloud Computing, Programming Languages, Ethical Hacking and much more.

Recent Comments

Popular posts, 7 tools to detect memory leaks with examples, 100+ linux commands cheat sheet & examples, tutorial: beginners guide on linux memory management, top 15 tools to monitor disk io performance with examples, overview on different disk types and disk interface types, 6 ssh authentication methods to secure connection (sshd_config), how to check security updates list & perform linux patch management rhel 6/7/8, 8 ways to prevent brute force ssh attacks in linux (centos/rhel 7).

Privacy Policy

HTML Sitemap

math homework hackerrank solution in python

Solutions to HackerRank Coding Challenges in Python

One of the best ways to absorb and retain new concepts that I have learnt about coding in Python is through documentation! As part of my journey to future-proof my data career and also to improve my proficiency in the python language, I have spent some of my free time to solve coding challenges on HackerRank . In this blog post, I shared the solutions to some of the practice challenges which I have completed and successfully passed the code in the compiler on HackerRank . Do click on Read More or the title of this blog post for the Python 3 solutions which I have created.

Arithmetic Operators

Print function, write a function, python introduction (easy) questions.

Given an integer, n , perform the following conditional actions:

  • If n is odd, print Weird
  • If n is even and in the inclusive range of 2 to 5 , print Not Weird
  • If n is even and in the inclusive range of 6 to 20 , print Weird
  • If n is even and greater than 20 , print Not Weird

Input Format: A single line containing a positive integer, n .

Constraints:

  • 1 <= n <= 100

Output Format: Print Weird if the number is weird. Otherwise, print Not Weird .

The provided code stub reads two integers from STDIN, a and b . Add code to print three lines where:

  • The first line contains the sum of the two numbers.
  • The second line contains the difference of the two numbers (first - second).
  • The third line contains the product of the two numbers.

Print the following:

Input Format: The first line contains the first integer, a . The second line contains the second integer, b .

Output Format: Print the three lines as explained above.

Sample Input 0

Sample Output 0

The provided code stub reads two integers from STDIN, a and b . Add logic to print two lines. The first line should contain the result of integer division, a//b . The second line should contain the result of float division, a/b .

No rounding or formatting is necessary.

  • The result of the integer division 3//5 = 0 .
  • The result of the float division is 3/5 = 0.6 .

Input Format

The first line contains the first integer, a . The second line contains the second integer, b .

Output Format

Print the two lines as described above.

The provided code stub reads and integer, n , from STDIN. For all non-negative integers i < n , print i**2 .

The list of non-negative integers that are less than n = 3 is [0,1,2] . Print the square of each number on a separate line.

Input Format: The first and only line contains the integer, n .

Constraints: 1 <= n <= 20

Output Format: Print n lines, one corresponding to each i .

The included code stub will read an integer, n , from STDIN.

Without using any string methods, try to print the following: 123 . . . n

Note that “…” represents the consecutive values in between.

Example n=5

Print the string 12345 .

Input Format: The first line contains an integer n .

Constraints: 1 <= n <= 150

Output Format: Print the list of integers from 1 through n as a string, without spaces.

Python Introduction (Medium) Questions

An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.

In the Gregorian calendar, three conditions are used to identify leap years:

  • The year can be evenly divided by 100, it is NOT a leap year, unless:
  • The year is also evenly divisible by 400. Then it is a leap year. This means that in the Gregorian calendar, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years.

Given a year, determine whether it is a leap year. If it is a leap year, return the Boolean True , otherwise return False .

Note that the code stub provided reads from STDIN and passes arguments to the is_leap function. It is only necessary to complete the is_leap function.

Input Format: Read year , the year to test.

Constraints

1900 <= year <= 10 ** 5

Output Format: The function must return a Boolean value (True/False). Output is handled by the provided code stub.

Explanation 0

1990 is not a multiple of 4 hence it’s not a leap year.

Programmingoneonone

Programmingoneonone

Programmingoneonone is a website that publishes daily tutorials, methods, guides, and articles on IT, Education, and technology.

HackerRank Write a function problem solution in python

In this HackerRank write a function problem solution in python , An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.

Given a year, determine whether it is a leap year. If it is a leap year, return the Boolean True, otherwise return False.

Note that the code stub provided reads from STDIN and passes arguments to the is_leap function. It is only necessary to complete the is_leap function.

HackerRank Write a function solution in python

Problem solution in Python 2 programming.

Problem solution in Python 3 programming.

Problem solution in pypy programming., problem solution in pypy3 programming., related tutorials.

HackerRank pointers in c problem solution

Coding Made Simple

Array Mathematics in Python | HackerRank Solution

Hello coders, today we are going to solve Array Mathematics HackerRank Solution in Python .

Array Mathematics in Python

Basic mathematical functions operate element-wise on arrays. They are available both as operator overloads and as functions in the  NumPy  module.

You are given two integer arrays,  A  and  B  of dimensions  N X M . Your task is to perform the following operations:

  • Add ( A  +  B )
  • Subtract ( A  –  B )
  • Multiply ( A  *  B )
  • Integer Division ( A  /  B )
  • Mod ( A  %  B )
  • Power ( A  **  B )

Note There is a method numpy.floor_divide() that works like numpy.divide() except it performs a floor division.

Input Format

The first line contains two space separated integers,  N  and  M . The next  N  lines contains  M  space separated integers of array . The following  N  lines contains  M  space separated integers of array  B .

Output Format

Print the result of each operation in the given order under  Task .

Sample Input

Sample Output

Use  //  for division in Python 3.

Solution – Array Mathematics in Python

Disclaimer: The above Problem ( Array Mathematics ) is generated by Hacker Rank but the Solution is Provided by CodingBroz . This tutorial is only for Educational and Learning Purpose.

Leave a Comment Cancel Reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Solutions and explanations to practice problems (algorithms, data structures, math, tutorials, language proficiency) on hackerrank in python.

Kumbong/hackerrank

Folders and files.

NameName
273 Commits
ISSUE_TEMPLATE ISSUE_TEMPLATE

Repository files navigation

math homework hackerrank solution in python

<<<<<<< HEAD (Efficient!!) solutions to problems on HackerRank in Python. ======= My (Efficient!!) solutions to problems on HackerRank in Python and other languages . >>>>>>> 23ca07ed92c98673f4a9869fe94036744a487ffb

| hackerrank | algorithms| data structures | mathematics | c | c++ | java | python | ruby | linux shell | functional programming | artificial intelligence | sql | databases | regex | interview preparation kit |30 days of code| 10 days of statistics |10 days of javascript |

math homework hackerrank solution in python

# Problem Solution Difficulty Points Sub domain
1 Easy 1 Warm up
2 Easy 10 Warm up
3 Easy 10 Warm up
4 Easy 10 Warm up
5 Easy 10 Warm up
6 Easy 10 Warm up
7 Easy 10 Warm up
8 Easy 10 Warm up
9 Easy 10 Warm up
10 Easy 10 Warm up
11 Solution Easy 10 Implementation
12 Solution Easy 10 Implementation
13 Solution Easy 10 Implementation
14 Solution Easy 10 Implementation
15 Solution Easy 10 Implementation
16 Solution Easy 10 Implementation
17 Solution Easy 10 Implementation
18 Solution Easy 10 Implementation
19 Solution Easy 10 Implementation
20 Solution Easy 10 Implementation
21 Solution Easy 10 Implementation
22 Solution Easy 15 Implementation
23 Solution Easy 15 Implementation
24 Solution Easy 15 Implementation
25 Solution Easy 20 Implementation
26 Solution Easy 15 Implementation
27 Solution Easy 20 Implementation
28 Solution Easy 20 Implementation
29 Solution Easy 20 Implementation
30 Solution Easy 15 Implementation
31 Solution Easy 15 Implementation
32 Solution Easy 20 Implementation
33 Solution Easy 20 Implementation
34 Solution Easy 25 Implementation
35 Solution Medium 20 Implementation
36 Solution Easy 20 Implementation
37 Solution Easy 25 Implementation
38 Solution Easy 20 Implementation
39 Solution Easy 25 Implementation
40 Solution Easy 20 Implementation
41 Solution Easy 20 Implementation
42 Solution Medium 25 Implementation
43 Solution Easy 25 Implementation
44 Solution Easy 30 Implementation
45 Solution Easy 30 Implementation
46 Solution Easy 10 Strings
47 Solution Easy 15 Strings
48 Solution Easy 15 Strings
49 Solution Easy 15 Strings
50 Solution Easy 15 Strings
51 Solution Easy 20 Strings
52 Solution Easy 20 Strings
53 Solution Easy 25 Strings
54 Solution Easy 20 Strings
55 Solution Easy 20 Strings
56 Solution Easy 20 Strings
57 Solution Easy 25 Strings
57 Solution Easy 35 Strings
58 Solution Easy 20 Sorting
59 Solution Easy 30 Sorting
60 Solution Easy 30 Sorting
61 Solution Easy 30 Sorting
62 Solution Easy 30 Sorting
63 Solution Easy 30 Sorting
63 Solution Easy 30 Sorting
64 Solution Easy 35 Sorting
65 Solution Easy 35 Sorting
66 Solution Easy 30 Search
67 Solution Easy 45 Search
68 Solution Medium 50 Search
69 Solution Easy 40 Search
70 Solution Easy 15 Greedy
71 Solution Easy 30 Greedy
72 Solution Easy 35 Greedy
73 Solution Easy Greedy
74 Solution Medium 35 Greedy
75 Solution Easy 40 Greedy
76 Solution Easy 40 Greedy
77 Solution Medium 45 Dynamic Programming
78 Solution Easy 20 Bit manipulation
79 Solution Easy 30 Bit manipulation
80 Solution Easy 40 Bit Manipulation
81 Solution Easy 25 Debugging
82 Solution Medium 40 Debugging
83 Solution Easy 25 Debugging
84 Solution Easy 15 Implementation
85 Solution Easy 20 Implementation
86 Solution Easy 15 Implementation
87 Solution Easy 10 Implementation
88 Solution Easy 15 Implementation
89 Solution Easy 15 Implementation
90 Solution Easy 15 Implementation
91 Solution Easy 20 Implementation
92 Solution Easy 30 Implementation
93 Solution Easy 30 Implementation
94 Solution Easy 25 Implementation
95 Solution Easy 30 Implementation
96 Solution Easy 20 Implementation
97 Solution Easy 20 Implementation
98 Solution Easy 25 Implementation
99 Solution Easy 20 Implementation
100 Solution Easy 20 Strings
101 Solution Easy 25 Strings
102 Solution Easy 30 Strings
103 Solution Easy 20 Greedy
104 Solution Medium 30 Bit Manipulation
105 Solution Easy 30 Implementation
106 Solution Meidum 40 Debugging
107 Solution Meidum 30 Implementation
108 Solution Hard 80 Implementation
109 Solution Easy 25 Implementation
110 Solution Easy 20 Greedy
111 Solution Easy 25 Strings
112 Solution Easy 10 Sorting
113 Solution Easy 30 Greedy
114 Solution Easy 20 Greedy
115 Medium 20 Implementation
116 Easy 30 Greedy
117 Medium 40 Implementation
# Problem Solution Difficulty Points Sub domain
1 Solution Easy 5 Introduction
2 Solution Easy 10 Introduction
3 Solution Easy 10 Introduction
4 Solution Easy 10 Introduction
5 Solution Easy 10 Introduction
6 Solution Medium 10 Introduction
7 Solution Easy 20 Introduction
8 Solution Easy 10 Basic data types
9 Solution Easy 10 Basic data types
10 Solution Easy 10 Basic data types
11 Solution Easy 10 Basic data types
12 Solution Easy 10 Basic data types
13 Solution Easy 10 Basic data types
14 Solution Easy 10 Strings
15 Solution Easy 10 Strings
16 Solution Easy 10 Strings
17 Solution Easy 10 Strings
18 Solution Easy 10 Strings
19 Solution Easy 10 Strings
20 Solution Easy 20 Strings
21 Solution Easy 10 Sets
22 Solution Medium 50 Sets
23 Solution Easy 10 Sets
24 Solution Easy 10 Sets
25 Solution Easy 10 Sets
26 Solution Easy 10 Sets
27 Solution Easy 10 Sets
28 Solution Easy 10 Sets
29 Solution Easy 10 Sets
30 Solution Easy 20 Sets
31 Solution Easy 10 Sets
32 Solution Easy 10 Sets
# Problem Solution Difficulty Points Sub domain
1 Easy 5 Introduction
2 Easy 5 Introduction
3 Easy 10 Introduction
4 Easy 10 Introduction
5 Easy 10 Introduction
6 Easy 10 Introduction
7 Easy 10 Introduction
8 Easy 10 Introduction
9 Easy 30 Introduction
10 Easy 10 Strings
11 Easy 10 Strings
12 Easy 10 Classes
13 Easy 10 Classes
14 Easy 20 Classes
15 Easy 30 Classes
16 Medium 30 Classes
17 Medium 30 Classes
18 Medium 40 Classes
19 Easy 10 STL
20 Easy 10 STL
# Problem Solution Difficulty Points Sub domain
1 Easy 5 Introduction
2 Easy 5 Introduction
3 Easy 10 Introduction
4 Easy 10 Introduction
5 Easy 10 Introduction

Contributing

If you are interested in helping or have a solution in a different language feel free to make a pull request. You can also reach me on through the following media if you want to talk.

  • Email - [email protected]
  • Follow me on twitter
  • Let's connect on linkedin
  • I'm on hackerrank as well

Code of conduct

Contributors 3.

  • Python 59.1%
  • JavaScript 3.4%

Something went wrong!

Some error occured while loading page for you. Please try again.

Challenge Walkthrough

Review the problem statement, choose a language, enter your code, test your code, submit to see results.

  • Check your score

IMAGES

  1. Find the point

    math homework hackerrank solution in python

  2. Python

    math homework hackerrank solution in python

  3. #8 Finding the percentage Hackerrank Solution Python

    math homework hackerrank solution in python

  4. Python HackerRank Solutions: List Comprehensions

    math homework hackerrank solution in python

  5. #7 list comprehension python hackerrank solution

    math homework hackerrank solution in python

  6. Python Evaluation Hackerrank Solution

    math homework hackerrank solution in python

VIDEO

  1. Python Helper

  2. Python HackerRank Solutions: Integers Come In All Sizes

  3. Python homework part 2

  4. HackerRank

  5. Highest Value Palindrome Hackerrank Solution

  6. Triangle Quest 2 HackerRank Solution

COMMENTS

  1. Lily's Homework

    In this post, we will solve Lily's Homework HackerRank Solution. This problem (Lily's Homework) is a part of HackerRank Problem Solving series. ... Python import math import os import random import re import sys # # Complete the 'lilysHomework' function below. # # The function is expected to return an INTEGER.

  2. HackerRank Lily's Homework problem solution

    In this HackerRank Lily's Homework problem solution we have given the array arr, determine and return the minimum number of swaps that should be performed in order to make the array beautiful. Problem solution in Python. #!/bin/python3 import math import os import random import re import sys # # Complete the 'lilysHomework' function below. #...Learn More "HackerRank Lily's Homework ...

  3. HackerRank Solutions in Python

    Dot and Cross - Hacker Rank Solution. Inner and Outer - Hacker Rank Solution. Polynomials - Hacker Rank Solution. Linear Algebra - Hacker Rank Solution. Disclaimer: The above Python Problems are generated by Hacker Rank but the Solutions are Provided by CodingBroz. These tutorials are only for Educational and Learning Purpose.

  4. GitHub

    A collection of solutions for HackerRank data structures and algorithm problems in Python, JAVA, and CPP. This community-owned project aims to bring together the solutions for the DS & Algo problems across various platforms, along with the resources for learning them. Problems from Leetcode will be included soon in the project.

  5. hackerrank-solutions/certificates/problem-solving-intermediate ...

    A collection of solutions to competitive programming exercises on HackerRank. - kilian-hu/hackerrank-solutions

  6. HackerRank 'Lily's Homework' Solution

    Lily's Homework. Complexity: time complexity is O(N\\*log(N)) space complexity is O(N) Execution: Let us rephrase the problem to a sorting problem: Find the number of swaps to make the array sorted. We need to consider both ascending and descending arrays. The solution assumes no duplicates. Solution:

  7. Hackerrank Solutions for Mathematics and Algorithms

    This Solution set is authored by myself when I was solving some of Mathematics problems, It is not a complete set - A work in Progress. If you have a code with better time complexity feel free to give a PR and also feel free to contribute.

  8. Lily's Homework

    Function Description. Complete the lilysHomework function in the editor below. lilysHomework has the following parameter (s): int arr [n]: an integer array. Returns. int: the minimum number of swaps required. Input Format. The first line contains a single integer, , the number of elements in . The second line contains space-separated integers, .

  9. Hackerrank Solution: Find Angle MBC in Python [4 Methods]

    Solution-1: Using math module. The math module is a standard module in Python and is always available. To use mathematical functions under this module, you have to import the module using import math. Let us import the math module and find the angle using the given sides of the triangle. # taking the input from user.

  10. Solve Python

    Join over 23 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews. ... Easy Python (Basic) Max Score: 10 Success Rate: 89.60%. Solve Challenge. Arithmetic Operators. ... Math. Itertools. Collections. Date and Time. Errors and Exceptions. Classes. Built-Ins. Python Functionals.

  11. Solutions to HackerRank Coding Challenges in Python

    In this blog post, I shared the solutions to some of the practice challenges which I have completed and successfully passed the code in the compiler on HackerRank. Do click on Read More or the title of this blog post for the Python 3 solutions which I have created. Python Introduction (Easy) Questions. If-Else; Arithmetic Operators; Division; Loops

  12. HackerRank Python If-Else problem solution

    In this HackerRank Python If - Else problem-solution set, Given an integer, n, perform the following conditional actions: If n is odd, print Weird. If n is even and in the inclusive range of 2 to 5, print Not Weird. If n is even and in the inclusive range of 6 to 20, print Weird. If n is even and greater than 20, print Not Weird.

  13. hackerrank-python-solutions/03 python-arithmetic-operators.py ...

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window.

  14. HackerRank Write a function problem solution in python

    In this HackerRank write a function problem solution in python, An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.

  15. Array Mathematics in Python

    HackerRank Menu Toggle. 10 Days of JavaScript; 10 Days of Statistics; 30 Days of Code; HackerRank Algorithms; HackerRank Linux Shell; HackerRank C; HackerRank C++; HackerRank Java; HackerRank Python; HackerRank Ruby; HackerRank SQL; HackerRank Functional Programming; CP Menu Toggle. CodeChef Menu Toggle. DSA Learning Series; Leetcode; Languages ...

  16. Assignment Problem

    Assignment Problem. Calvin has a math assignment at school where he has to evaluate a lot of expressions. Calvin decides to not to waste much of his time. There are expressions overall. By looking at Susie's answers, Calvin has figured that the answers to all questions form a non decreasing sequence. He decides that all his answers are going ...

  17. Students have been assigned a series of math problems

    Students have been assigned a series of math problems - LeetCode Discuss. Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

  18. yznpku/HackerRank: HackerRank Solutions in Python3

    HackerRank Solutions in Python3. This is a collection of my HackerRank solutions written in Python3. The goal of this series is to keep the code as concise and efficient as possible. It might not be perfect due to the limitation of my ability and skill, so feel free to make suggestions if you spot something that can be improved.

  19. Solve Mathematics

    Mathematics. Mathematics. Find the Point. Easy Problem Solving (Basic) Max Score: 5 Success Rate: 88.45%. Solve Challenge. ... Join over 23 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews. We use cookies to ensure you have the best browsing experience on our website. ...

  20. GitHub

    Solutions to Problems from the Hackerrank Math 🧮 Domain. - anishLearnsToCode/hackerrank-math

  21. Lily's Homework Discussions

    1. Create an object named "pair" that contains the value of the element and its primary index position. 2. Get all the pair in a list, sort that list with customized comparator. 3. Traverse through the pair list, using the graph theory to identify circles consisting the group of element need to be swapped. 4. Specify the number of swaps.

  22. GitHub

    Solutions and explanations to practice problems (algorithms, data structures, math, tutorials, language proficiency) on hackerrank in python. - Kumbong/hackerrank

  23. Programming Problems and Competitions :: HackerRank

    Code your solution in our custom editor or code in your own environment and upload your solution as a file. 4 of 6; Test your code You can compile your code and test it for errors and accuracy before submitting. 5 of 6; Submit to see results When you're ready, submit your solution! Remember, you can go back and refine your code anytime. 6 of 6