First try to attempt the problems on your own, these soulutions exist merely to guide you when you are stuck.
These are the programs given in the 30 Days of Code challenge on Hackerrank. Each program has a separate file and also contains part of the questions. I have written all the programs in Python3.
Just a simple "Hello World" program to display an input string. This was just a warm-up program before the actual challenges.
A simple program to accept and display a sum of two numbers in integer and double types and also string concatenation with an input string. This was the first challenge and it was just to test out the functionality of the code.
We had to write the function to solve the problem for given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal and we had to find and print the meal's total cost rounded to the nearest integer number.
We had to write the function to solve the problem for given condition that for a given number we have to give a specific output. This was just to practice the conditional statements.
We had to differenciate between a class and an instance; because this is an Object Oriented concept. So, a class was initialised with age as a parameter and functions to increase the age of the instance and show appropriate message as output.
It is a simple problem where a number is accepted and the multiplication table till 10 is printed.
In this problem, number of words and words are taken as input and the even and odd positioned elements in the words are printed separately.
This was a simple problem where an array is taken as input and printed out in the reverse order.
In this problem pairs of name and phone number are taken as input and when a query is used to retrieve the phone number by name, the phone number is printed and if name does not match error is printed.
This is a simple problem where a number is taken as input and iterated recursively to find the factorial of the number.
In this problem, a number is taken as input and converted into binary number. Then the binary number is iterated through and the highest number of consecutive '1's are returned.
In this problem, an array is taken as input.Then, we calculate the hourglass sum for every hourglass in the array, then print the maximum hourglass sum.
In this problem, the student class stores the student's information and prints the grade after calculating the average of marks.
In this problem, the MyBook class inherits from the Book class and stores the information. A new method is created to override the abstract method in the Book class and prints the book's details.
In this problem, Difference is class which stores a list of numbers and a function calculates and stores the maximum difference between any of the two elements and print the difference as output.
In this problem, the insert function creates a new Node (pass as the Node constructor argument) and inserts it at the tail of the linked list referenced by the parameter. Once the new node is added, returns the reference to the node to be displayed.
This is a simple problem where a number is taken as input and converted into integer, but if the input is not an integer, the exception will print an error message.
This is a problem where two numbers n and p are taken as input and used to calculate the n to the power p value, but if any of them are negative then the appropriate error is returned.
In this problem, a class has two instances, one stack and one queue. The stack is used to push and pop elements and queue is used to enqueue and dequeue elements. By this way, the string is checked for palindrome.
In this problem, the implementation of Calculator class, which implements the AdvancedArithmetic interface. The implementation for the divisorSum(n) method must return the sum of all divisors of n.
In this problem, the sorting is performed with least number of swaps. Finally the sorting result is printed with the number of swaps.
In this problem, the function takes an array of generic elements as a parameter (the exception to this is C++, which takes a vector). Had to do in Java, since Python3 wasn't available.
In this problem, the height of a binary search tree is the number of edges between the tree's root and its furthest leaf. You are given a pointer pointing to the root of a binary search tree. The getHeight function returns the height of the binary search tree.
In this problem, A level-order traversal, also known as a breadth-first search, visits each level of a tree's nodes from left to right, top to bottom. Given a pointer, pointing to the root of a binary search tree. It prints the level-order traversal of the binary search tree.
In this problem, each Node in the linked list is traversed and duplicate of each element is removed.