diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 00000000..de79271c
Binary files /dev/null and b/.DS_Store differ
diff --git a/.travis.yml b/.travis.yml
index b164a023..1dd014fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,4 +35,4 @@ matrix:
notifications:
on_success: change
- on_failure: change # `always` will be the setting once code changes slow down
+ on_failure: change # `always` will be the setting once code changes fast
diff --git a/ASSIGNMENTS/12 hr to 24 hr format b/ASSIGNMENTS/12 hr to 24 hr format
new file mode 100644
index 00000000..b20d1050
--- /dev/null
+++ b/ASSIGNMENTS/12 hr to 24 hr format
@@ -0,0 +1,26 @@
+Given a time in 12-hour AM/PM format, convert it to military (24-hour) time.
+
+Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.
+
+Function Description
+
+Complete the timeConversion function in the editor below. It should return a new string representing the input time in 24 hour format.
+
+timeConversion has the following parameter(s):
+
+s: a string representing time in 12-hour format
+Input Format
+
+A single string containing a time in -hour clock format (i.e. hh:mm:ss AM or hh:mm:ss PM ), where 01<=hh<=12 and 00<=mm,ss<=59 .
+
+Constraints
+
+All input times are valid
+Output Format
+
+Convert and print the given time in 24-hour format, where 00<=hh<=24 .
+
+Sample Input 0:
+07:05:45PM
+Sample Output 0:
+19:05:45
diff --git a/ASSIGNMENTS/3rd Largest number in Unsorted Array.md b/ASSIGNMENTS/3rd Largest number in Unsorted Array.md
new file mode 100644
index 00000000..92bde715
--- /dev/null
+++ b/ASSIGNMENTS/3rd Largest number in Unsorted Array.md
@@ -0,0 +1,3 @@
+Use any language & write a program that takes an unsorted array in input & returns the third largest number form Array as output.
+
+Make sure, Solution has minimum complexity possible.
diff --git a/ASSIGNMENTS/A Game of Robots.md b/ASSIGNMENTS/A Game of Robots.md
new file mode 100644
index 00000000..7248f5a3
--- /dev/null
+++ b/ASSIGNMENTS/A Game of Robots.md
@@ -0,0 +1,39 @@
+You've built some robots and placed them on an one dimensional grid with n cells. Their arrangement is given by a string s of length n. Each character of the string is either '.' or a digit in the range '0' to '9'. A '.' represents that there is no robot at that cell initially. A digit represents a robot initially in that cell. Specifically, the digit x denotes that the range of the robot is from x cells to the left of its starting point to x cells to the right of its starting point.
+
+For example, suppose the 7th character of the string is 3, then that means that there is a robot starting from the 7th cell, and its range is from the 4th cell (7 - 3 = 4) to the 10th cell (7 + 3 = 10) (both end points inclusive). The robots can move only within their range, and even if their range allows it, they cannot move out of the grid.
+
+You want to play a game with these robots. Before starting the game, you can give each robot a starting direction (either left or right). When the robot is initialized with a direction, it will move in that direction until it can (ie. it can't go past its range, and neither can it go outside the grid) and will reverse its direction and go as far as possible in that direction, and then reverse, and so. It will keep going like this forever. Assume that the change of direction happens instantaneously.
+
+But the catch is that each of the robots can start their journey at any time. They don't all have to start at the same second. It won't stop once it starts moving though. And they all move at the same speed of one cell per second, once they start.
+
+The robots have gained consciousness, and have begun questioning their purpose in life. So given a chance, they will collide with each other and end their misery. They can coordinate with each other as well and decide when they should start their journeys. Two robots are said to have collided if they are at the same cell at the same moment.
+
+You are wondering whether it is possible to give the robots the initial directions in such a way that no robots collide with each other (ie. they'll all be safe), or if no matter what initial directions you give, some of them will end up colliding with each other (ie. unsafe).
+
+Input
+The first line of the input contains an integer T denoting the number of test cases. The description of the test cases follows.
+The only line of each test case contains a string s.
+Output
+For each test case, output a single line containing "safe" or "unsafe" (without quotes).
+Constraints
+1=T=3*104
+1= length of s=50
+s[i] will be one of the following characters {'.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}
+ Example
+Input
+4
+....
+.2.....
+.2...2..
+1.1.1.
+Output
+safe
+safe
+unsafe
+unsafe
+Explanation
+Example 1: No robots. Everything is safe.
+
+Example 2: Only one robot. Everything safe. To give an example of its movement, suppose you give it the starting direction as left and suppose it decides to start moving at time = 5 seconds. Then till t = 5, it is at cell 2 (its starting position, 1-based indexing). At t = 6, it is at cell 1. At t = 7, it is at cell 2, at t = 8, it will be at cell 3, at t = 9 it will be at cell 4 and at t = 10 it will be at cell 3. And so on.
+
+Example 3: No matter what initial directions you give, the two robots can coordinate and start their journeys such that they collide at the cell 4.
diff --git a/ASSIGNMENTS/ACIIIproduct.txt b/ASSIGNMENTS/ACIIIproduct.txt
index e0aee43e..a5e11286 100644
--- a/ASSIGNMENTS/ACIIIproduct.txt
+++ b/ASSIGNMENTS/ACIIIproduct.txt
@@ -8,4 +8,12 @@ Output : 6059
73 * 83 = 6059
Input : str = "GfG"
-Output : 514182
\ No newline at end of file
+Output : 514182
+
+
+Input : str = "ab"
+Output : 9506
+
+Input: str="AB"
+Output: 4290
+
diff --git a/ASSIGNMENTS/ATM problem.md b/ASSIGNMENTS/ATM problem.md
index 1d5a70d7..563750f4 100644
--- a/ASSIGNMENTS/ATM problem.md
+++ b/ASSIGNMENTS/ATM problem.md
@@ -34,3 +34,5 @@ Explanation
Example case 1: The ATM machine initially contains 10 units of money. The first person comes and withdraws 3 units, so the amount remaining in the machine is 7. Then the second person withdraws 5 units and the remaining amount is 2. The third person wants to withdraw 3 units, but since there are only 2 units of money in the machine, it throws an error and the third person must leave without getting anything. Then the fourth person withdraws 2 units, which leaves nothing in the machine, so the last person does not get anything.
Example case 2: The ATM machine initially contains 6 units of money, so it cannot give anything to the first and second person. When the third person comes, it gives them all the money it has, so the last person does not get anything either.
+
+The operating system and compatibility of that server matters the working of an ATM machine.
diff --git a/ASSIGNMENTS/Advanced prob_FizzBuzz b/ASSIGNMENTS/Advanced prob_FizzBuzz
new file mode 100644
index 00000000..320ac0fb
--- /dev/null
+++ b/ASSIGNMENTS/Advanced prob_FizzBuzz
@@ -0,0 +1,45 @@
+Q)FizzBuzz
+---------------------------------------------------------------------------------
+
+Write a program that prints the numbers in the given range. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. Print a new line after each string or number.
+Input Format First line will be the number of testcases, T. Next line will have T integers, denoted by N.
+Output Format For each testcase, print the number from 1 to N. But follow the rules given in the problem statement.
+Constraints
+1 <= T <= 10
+N is an integer.
+Please read the below instructions carefully
+You can choose any language from the given list to write your solution.
+All input to the programming solution is to STDIN and output is to STDOUT.
+You don't have to manually give the input to your program, just take the input from STDIN and the code evaluation engine will provide the input to your program.
+For example if you are coding in C, and the first input is an integer then simply do scanf('%d', &i) assuming you are reading that integer to a variable named i. Similarly if you are using C++ simply do cin >> i
+There are two different type of test cases. First type is the sample input and output for which you know both the input and output. You can look at them under the problem statement.
+When you click Compile and Test the code will be compiled and tested only on the sample input that is shown to you. Compile and Test is for you to understand if you solution is compiling and running against the sample input. 5 When you click submit, your code will be judged on multiple test cases which are hidden. These tests are not available for you to see them so you will not know the input on which your code will be tested. But it is assured that all inputs will be in the given constraint limit and in the given format as stated in the problem statement.
+In order for your code to get accepted, it must clear all the judge test cases. In cases where partial marking is allowed, you will awarded partial marks for the number of test cases your solution passes.
+Please note that getting green mark when you hit 'Compile and Test' does not indicate anything on the correctness of your program. It just indicates that your code correctly compiled and ran successfully against the sample input. It can still fail for other test inputs that visible to you.
+Do not output anything, except what it is asked for in the output section. Note that you have to output only in the way that is mentioned. Any extra strings in the output will be treated as wrong answer. Even an extra space can lead to the answer not being accepted.
+Don't assume any constraints on the input based on the sample input that you see, the actual test cases will be much larger in size. But they will always be within the constraints mentioned in the problem.
+To understand how the code is evaluated visit the judge page. There is also a sample code in each language there.
+To further understand how the judge works, look at one of the actual test input file and the corresponding expected output for this problem
+
+
+Sample Input Sample Output
+
+2
+3 15 1
+ 2
+ Fizz
+ 1
+ 2
+ Fizz
+ 4
+ Buzz
+ Fizz
+ 7
+ 8
+ Fizz
+ Buzz
+ 11
+ Fizz
+ 13
+ 14
+ FizzBuzz
diff --git a/ASSIGNMENTS/ArmstrongNumber.txt b/ASSIGNMENTS/ArmstrongNumber.txt
new file mode 100644
index 00000000..5ef67022
--- /dev/null
+++ b/ASSIGNMENTS/ArmstrongNumber.txt
@@ -0,0 +1,22 @@
+**Find given number is an armstrong number or not?
+Armstrong Number
+Input Number: 153
+ 1=>1*1*1=1
+ 5=>5*5*5=125
+ 3=> 3*3*3=27
+ Sum=>1+125+27=153
+ i.e; 153 is an armstrong number
+
+ Output:
+153 is an armstrong number.
+
+Input Number:125
+ 1=>1*1*1=1
+ 2=> 2*2*2=8
+ 5=>5*5*5=125
+ Sum=>1+8+125!=125
+ i.e; 153 is not an armstrong number
+
+ Output:
+125 is not an armstrong number.
+
diff --git a/ASSIGNMENTS/Beginners Problem 2.0 b/ASSIGNMENTS/Beginners Problem 2.0
new file mode 100644
index 00000000..42eac9a4
--- /dev/null
+++ b/ASSIGNMENTS/Beginners Problem 2.0
@@ -0,0 +1,14 @@
+# Beginners Problem 2.0
+Our juniors has just entered in coding community. Their first task is to find the frequency of Best numbers present in given list of elements. Best numbers are numbers which are divisible by 2.
+
+SAMPLE INPUT
+2
+5
+1 2 3 4 5
+3
+1 3 5
+SAMPLE OUTPUT
+2
+0
+Explanation
+Number of test cases=2 1st test case, number of elements =5 Best numbers are 2 , 4 ; frequency=2 2nd test case, number of elements =3 No Best numbers
diff --git a/ASSIGNMENTS/Bishu and his Girlfriend.md b/ASSIGNMENTS/Bishu and his Girlfriend.md
new file mode 100644
index 00000000..72c25396
--- /dev/null
+++ b/ASSIGNMENTS/Bishu and his Girlfriend.md
@@ -0,0 +1,28 @@
+Bishu and his Girlfriend
+
+There are N countries {1,2,3,4....N} and N-1 roads(i.e depicting a tree)
+
+Bishu lives in the Country 1 so this can be considered as the root of the tree.
+
+Now there are Q girls who lives in various countries (not equal to 1) .
+
+All of them want to propose Bishu.But Bishu has some condition.
+
+He will accept the proposal of the girl who lives at minimum distance from his country.
+
+Now the distance between two countries is the number of roads between them.
+
+If two or more girls are at the same minimum distance then he will accept the proposal of the girl who lives in a country with minimum id.
+
+No two girls are at same country.
+
+Input: First line consists of N,i.e number of countries Next N-1 lines follow the type u v which denotes there is a road between u and v. Next line consists of Q Next Q lines consists of x where the girls live.
+
+Output: Print the id of the country of the girl who will be accepted.
+
+Help Him!!!!!
+
+contraints: 2<=N<=1000 1<=u,v<=N 1<=Q<=(N-1)
+
+--------------------------------------------------------
+Author: https://www.hackerearth.com/@satishgpta007
diff --git a/ASSIGNMENTS/CompareLists b/ASSIGNMENTS/CompareLists
index fb8c619b..d60b736a 100644
--- a/ASSIGNMENTS/CompareLists
+++ b/ASSIGNMENTS/CompareLists
@@ -1 +1,10 @@
Write a Python program to compare two unordered lists (not sets).
+
+The program are:
+
+from collections import Counter
+def compare_lists(x, y):
+ return Counter(x) == Counter(y)
+n1 = [20, 10, 30, 10, 20, 30]
+n2 = [30, 20, 10, 30, 20, 50]
+print(compare_lists(n1, n2))
diff --git a/ASSIGNMENTS/Directions Reduction.md b/ASSIGNMENTS/Directions Reduction.md
new file mode 100644
index 00000000..3e9e47fe
--- /dev/null
+++ b/ASSIGNMENTS/Directions Reduction.md
@@ -0,0 +1,73 @@
+# Directions Reduction
+
+## **Once upon a time, on a way through the old wild west,…**
+… a man was given directions to go from one point to another. The directions were "NORTH", "SOUTH", "WEST", "EAST". Clearly "NORTH" and "SOUTH" are opposite, "WEST" and "EAST" too. Going to one direction and coming back the opposite direction is a needless effort. Since this is the wild west, with dreadfull weather and not much water, it's important to save yourself some energy, otherwise you might die of thirst!
+
+## How I crossed the desert the smart way.
+
+The directions given to the man are, for example, the following:
+
+```
+["NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST"].
+```
+
+or
+
+```
+{ "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST" };
+```
+
+or (haskell)
+
+```
+[North, South, South, East, West, North, West]
+```
+
+You can immediatly see that going "NORTH" and then "SOUTH" is not reasonable, better stay to the same place! So the task is to give to the man a simplified version of the plan. A better plan in this case is simply:
+
+```
+["WEST"]
+```
+
+or
+
+```
+{ "WEST" }
+```
+
+or (haskell)
+
+```
+[West]
+```
+
+or (rust)
+
+```
+[WEST];
+```
+
+## Other examples:
+
+In `["NORTH", "SOUTH", "EAST", "WEST"]`, the direction `"NORTH" + "SOUTH"` is going north and coming back right away. What a waste of time! Better to do nothing.
+
+The path becomes `["EAST", "WEST"]`, now `"EAST"` and `"WEST"` annihilate each other, therefore, the final result is `[]` (nil in Clojure).
+
+In ["NORTH", "EAST", "WEST", "SOUTH", "WEST", "WEST"], "NORTH" and "SOUTH" are not directly opposite but they become directly opposite after the reduction of "EAST" and "WEST" so the whole path is reducible to ["WEST", "WEST"].
+
+## Task
+
+Write a function `dirReduc` which will take an array of strings and returns an array of strings with the needless directions removed (W<->E or S<->N side by side).
+
+The Haskell version takes a list of directions with `data Direction = North | East | West | South`. The Clojure version returns nil when the path is reduced to nothing. The Rust version takes a slice of `enum Direction {NORTH, SOUTH, EAST, WEST}`.
+
+## Examples
+```
+dirReduc(["NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST"]) => ["WEST"]
+dirReduc(["NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH"]) => []
+```
+
+## Note
+Not all paths can be made simpler. The path ["NORTH", "WEST", "SOUTH", "EAST"] is not reducible. "NORTH" and "WEST", "WEST" and "SOUTH", "SOUTH" and "EAST" are not directly opposite of each other and can't become such. Hence the result path is itself : ["NORTH", "WEST", "SOUTH", "EAST"].
+
+_Reference:_ https://www.codewars.com/kata/directions-reduction/
\ No newline at end of file
diff --git a/ASSIGNMENTS/Don't Jump.md b/ASSIGNMENTS/Don't Jump.md
new file mode 100644
index 00000000..6449a23e
--- /dev/null
+++ b/ASSIGNMENTS/Don't Jump.md
@@ -0,0 +1,24 @@
+Chandu and Kundu are bored of dramatic games around. As they are very good friends and scholars they decided to discover a new game.
+In total they had N number of marbles with value inscribed on each of them from 1 to N.
+Chandu being from royal family has a treasure box. He emptied the box for the game to proceed.
+
+The game rule involved following operations :
+- Operation C : Chandu places a marble in the box. Each different marble can move inside the box only once.
+- Operation K : Kundu removes last entered marble from the box and notes down it's value on a chart.
+
+They were deciding further rules when a third person Mr. Chirp comes as a spoiler of the game. Chirp gives them a number N which is the maximum value inscribed among all marbles, and a sequence P. P can possibly be empty. In that case, in input an empty line would be there.
+
+Also, he added following restriction :
+- Kundu can perform operation K to take out a marble M only when all the marbles from values 1 to M-1 have went in the box before.
+
+Mr. Chirp kept on chirping and told Chandu and Kundu to generate the sequence of C's and K's for the chart to get filled by pattern P.
+Now, you have to help these kids before they jump out of their window in frustration.
+
+
+SAMPLE INPUT
+41
+6 11 8
+
+
+SAMPLE OUTPUT
+CCCCCCKCCCCCKKKK
\ No newline at end of file
diff --git a/ASSIGNMENTS/First_Hundred_natural_no_cubic.md b/ASSIGNMENTS/First_Hundred_natural_no_cubic.md
new file mode 100644
index 00000000..f37545a6
--- /dev/null
+++ b/ASSIGNMENTS/First_Hundred_natural_no_cubic.md
@@ -0,0 +1 @@
+Task : program to find out cube of first hundred natural no's(individually) in Python.
diff --git a/ASSIGNMENTS/Hello world.md b/ASSIGNMENTS/Hello world.md
index 995b7b62..061ae2b8 100644
--- a/ASSIGNMENTS/Hello world.md
+++ b/ASSIGNMENTS/Hello world.md
@@ -1,4 +1,4 @@
-This is a simple challenge to help you practice.
+/*This is a simple challenge to help you practice.
Input Format
@@ -7,3 +7,10 @@ You do not need to read any input in this challenge.
Output Format
Print "Hello world".
+*/
+#include
+int main()
+{
+printf("Hello world");
+return 0;
+}
diff --git a/ASSIGNMENTS/HelpKatekar.md b/ASSIGNMENTS/HelpKatekar.md
new file mode 100644
index 00000000..457db5b3
--- /dev/null
+++ b/ASSIGNMENTS/HelpKatekar.md
@@ -0,0 +1,25 @@
+Sartaj's partner, Katekar is very loyal to his job and also to Sartaj. In his dedication towards his duty, he often neglects his wife who ends up alone and sad. Today, katekar has promised his wife to reach home early and spend time with her. However he and Sartaj are stuck with a problem which may decide the future of Mumbai. As Katekar cannot leave in such a situation, help him to solve the problem so that he can get back to his wife.
+
+You are given an array A of length N. You need to detemine the largest subsequence B from the given array A such that for any index i and j in B if B[i]>B[j] then the frequency of B[i] is strictly greater than the frequency of B[j].
+
+Input format :
+
+ First line : a single integer N denoting the length of given array.
+ Second line : N space seperated integers denoting the array elements.
+
+Output fromat :
+
+ Print the length of largest subsequence B that can be formed.
+
+Constraints :
+
+ 1≤N≤1000
+ 1≤A[i]≤1000000
+
+Sample Input:-
+5
+1 2 2 3 3
+
+
+Sample Output:-
+3
diff --git a/ASSIGNMENTS/LCS.cpp b/ASSIGNMENTS/LCS.cpp
new file mode 100644
index 00000000..c4a3ea52
--- /dev/null
+++ b/ASSIGNMENTS/LCS.cpp
@@ -0,0 +1,55 @@
+#include
+
+using namespace std;
+
+int main(int argc, char** argv) {
+
+ int s1[] = {1, 0, 1, 1, 0}; // m = 5
+ int s2[] = {0, 1, 0, 0, 1, 0}; // n = 6
+
+
+ int arr[6][7];
+ string dir[6][7];
+
+ for(int i = 0; i < 6; i ++) {
+ for(int j = 0; j < 7; j++) {
+ arr[i][j] = 0;
+ }
+ }
+
+ for(int i = 1; i < 6; i ++) {
+ for(int j = 1; j < 7; j++) {
+ if(s1[i-1] == s2[j-1]) {
+ arr[i][j] = arr[i-1][j-1] + 1;
+ dir[i][j] = "diagonal";
+ } else {
+ if(arr[i][j-1] == arr[i-1][j]) {
+ arr[i][j] = arr[i][j-1];
+ dir[i][j] = "both";
+ } else if(arr[i][j-1] > arr[i-1][j]) {
+ arr[i][j] = arr[i][j-1];
+ dir[i][j] = "left";
+ } else {
+ arr[i][j] = arr[i-1][j];
+ dir[i][j] = "up";
+ }
+ }
+ }
+ }
+
+ for(int i = 1; i < 6; i ++) {
+ for(int j = 1; j < 7; j++) {
+ cout << arr[i][j] << " ";
+ }
+ cout << endl;
+ }
+
+ for(int i = 1; i < 6; i ++) {
+ for(int j = 1; j < 7; j++) {
+ cout << dir[i][j] << " ";
+ }
+ cout << endl;
+ }
+
+ return 0;
+}
diff --git a/ASSIGNMENTS/Manhattan distance b/ASSIGNMENTS/Manhattan distance
new file mode 100644
index 00000000..90dd14ca
--- /dev/null
+++ b/ASSIGNMENTS/Manhattan distance
@@ -0,0 +1,34 @@
+Manyland is a grid with N rows and M columns. Each cell of this grid is either empty or contains a house. The distance between
+a pair of houses is the Manhattan distance between the cells containing them.
+
+For each d between 1 and N+M−2 inclusive, Danny wants to calculate the number of unordered pairs of distinct houses with distance equal
+to d. Please help him!
+
+
+Input
+The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
+The first line of each test case contains two space-separated integers N and M.
+N lines follow. For each i (1≤i≤N), the i-th of these lines contains a binary string with length M; for each j (1≤j≤M),
+the j-th character of this string is '1' if the cell in the i-th row and j-th column contains a house or '0' if it is empty.
+
+
+Output
+For each test case, print a single line containing N+M−2 space-separated integers. For each valid i, the i-th integer
+should denote the number of pairs with distance i.
+
+
+Constraints
+1≤T≤3
+2≤N,M≤300
+
+
+Example Input
+1
+3 4
+0011
+0000
+0100
+
+
+Example Output
+1 0 1 1 0
diff --git a/ASSIGNMENTS/Question for practice b/ASSIGNMENTS/Question for practice
new file mode 100644
index 00000000..73bedab3
--- /dev/null
+++ b/ASSIGNMENTS/Question for practice
@@ -0,0 +1,17 @@
+# Question for practice
+Joseph came across the next question , which asked him to check if the word spelt the same backwards .
+
+A simple enough question , he started to solve the question only to be constrained by language allowed.
+
+(Input a string (of character <80) from the user and print whether the string is a palindrome or not.
+
+Assume no spaces between characters.) Sample Input: eergreejj
+
+Sample Output: Not At All
+
+(If it is a palindrome - print "Indeed")
+
+SAMPLE INPUT
+eergreejj
+SAMPLE OUTPUT
+Not At All
diff --git a/ASSIGNMENTS/ReadFile b/ASSIGNMENTS/ReadFile
index c7f01af1..abd23b5a 100644
--- a/ASSIGNMENTS/ReadFile
+++ b/ASSIGNMENTS/ReadFile
@@ -1 +1 @@
-This program should read text from a file and stores it in a string until enter 'newline' character is encountered.
+This program should read text from a file and stores it in a string until enter 'newline' character is encountered/assigned.
diff --git a/ASSIGNMENTS/Reduction Game.md b/ASSIGNMENTS/Reduction Game.md
new file mode 100644
index 00000000..e100cc3d
--- /dev/null
+++ b/ASSIGNMENTS/Reduction Game.md
@@ -0,0 +1,36 @@
+You are playing a game called the Reduction Game. This game is played on an array a with n integers. You also have another integer k with you. The following operation will be made repeatedly on this array:
+
+Choose any two elements ai,aj such that i?j, and min(ai,aj)>k. Decrease both ai and aj by one.
+This operation should be applied to the array if it's possible to apply it. But if there are multiple valid choices of ai and aj, you can choose which ones to do first and so on. The aim is to apply the operations in such a way, so as to maximize the sum of the elements in the array at the end. Your task is to find the maximum possible sum of the final array.
+
+Input
+The first line of the input contains an integer T denoting the number of test cases. The description of the test cases follows.
+The first line of each test case contains two integers n,k denoting the number of elements in the array a.
+The second line contains n space-separated integers denoting the array a.
+Output:
+For each test case, output an integer corresponding to the maximum possible sum of the remaining array in a new line.
+
+Constraints
+1=T=5000
+1=n=50
+1=ai,k=50000
+Sample Input:
+3
+2 1
+1 2
+2 1
+2 2
+3 1
+2 3 2
+Sample Output:
+3
+2
+5
+Explanation
+Example 1: The initial array is [1, 2]. In this case, there are no two elements > 1. So, no operations can be made, and this is the only final array possible. And the sum of this is 3, and hence that is the answer.
+
+Example 2: The initial array is [2, 2]. You can decrease 1 from both the elements and get the array to [1, 1]. This is the only valid pair available, so you are forced to reduce this pair. After doing so, you can't make any more operations. So, [1, 1] is the only final array achievable, and it's sum is is 2.
+
+Example 3: The initial array is [2, 3, 2]. You could pick the first two elements and reduce them, to get the array [1, 2, 2]. Now, you have to choose the last two elements and reduce them, to get [1, 1, 1]. This is one possible final array, whose sum is 3.
+
+Instead, you could initially have chosen the first and third element and reduced them to get [1, 3, 1]. After this, there is no operation possible, and so this is another final array achievable. Its sum is 5, and there is nothing better than this. Hence the answer is 5.
diff --git a/ASSIGNMENTS/ReductionGame.py b/ASSIGNMENTS/ReductionGame.py
new file mode 100644
index 00000000..843e0bcb
--- /dev/null
+++ b/ASSIGNMENTS/ReductionGame.py
@@ -0,0 +1,73 @@
+#Author: Nirupam Gunwal
+
+# Issue Solve Reduction Game #573
+
+#Detailed Solution to the Problem Described at https://github.com/hackerearthclub/CODE2RACE/blob/master/ASSIGNMENTS/Reduction%20Game.md
+# in Python 3
+
+
+
+def answer(arr):
+
+ ntestcase = arr[0]
+
+ narr = []
+ k = []
+ sumfinal = []
+
+
+ arrn = []
+ loopcount = len(arr)
+ i = 1
+ while i < loopcount :
+
+ n = arr[i]
+ narr.append(n)
+ k.append(arr[i+1])
+ arrlist = arr[i + 2 : i + n + 2]
+ arrn.append(arrlist)
+ i = i + n + 2
+
+
+ for i in range(ntestcase):
+ sortedarray = sorted(arrn[i])
+
+ j = 0
+ while j < len(sortedarray) - 1:
+
+ while min(sortedarray[j],sortedarray[j+1]) > k[i]:
+ sortedarray[j] = sortedarray [j] - 1
+ sortedarray[j+1] = sortedarray [j+1] - 1
+
+ j = j + 1
+
+ sumfinal.append(sum(sortedarray))
+
+
+ print("Output:")
+ print(sumfinal)
+
+
+def main():
+
+ print("Use Test Case OR Input Your Own .(y for Your Own Input else Test Case will be considered)")
+
+ if(str(input()) == 'y'):
+ print("Test Case Selected")
+ arr = [3,2,1,1,2,2,1,2,2,3,1,2,3,2]
+
+ else:
+
+ print("Input Selected .Give the input according to the question and use dont use spaces to seperate numbers :")
+ print(" Input Should be of the format like this : 32112212231232 (No spaces)")
+ arr = list(input())
+
+ for i in range(len(arr)):
+ arr[i] = int(arr[i])
+
+
+ answer(arr)
+
+if __name__ == '__main__':
+ main()
+
diff --git a/ASSIGNMENTS/SwimmingPool.md b/ASSIGNMENTS/SwimmingPool.md
new file mode 100644
index 00000000..2cf74a7d
--- /dev/null
+++ b/ASSIGNMENTS/SwimmingPool.md
@@ -0,0 +1,105 @@
+The summer is coming and Chef wants to fill his swimming pool with water so that he could enjoy swimming in it during these hot days.
+
+The swimming pool is N metres in length (long course) and a fixed width 1 metre. Its long course is split into N equal parts, with possibly different depths. For each valid i, the i-th part has depth Di metres.
+
+You should process Q queries. There are two types of queries:
+
+1xv — pour v cubic metres of water into the x-th part of the pool
+2x — find how much metres deep is the water surface from the ground in the x-th part of the pool. If there's no water on this part then the water surface depth is same as the depth of this part.
+Water level obeys the following rules. As long as the water level in some part of the pool is higher than the water level in at least one of the adjacent parts, the water from it will move to adjacent parts with lower water levels until water levels become equal or there is no water left in this part. If the adjacent part from both sides (left and right) have lower water level then the half of the quantity of water in the current part will move to left and the other half will move to the right. The water on the leftmost part can't move to the left, and the water on the rightmost part can't move to the right.
+
+When the water level reaches the surface of the pool (i.e. its depth become 0), the pool overflows and the water level does not increase anymore.
+
+Please refer to the samples for more clarification.
+
+
+Input
+The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
+The first line of each test case contains two space-separated integers N and Q.
+The second line contains N space-separated integers D1,D2,…,DN.
+Q lines follow. Each of these lines describes a query in the format 1xv or 2x.
+
+Output
+For each query of the second type, print a single line containing one real number — the depth of the water surface of the x-th part of the pool if it contains water, or Dx if it does not. Your answer will be considered correct if its relative or absolute error does not exceed 10−6.
+
+Constraints
+1≤T≤100
+1≤N,Q≤105
+the sum of N in all test cases does not exceed 105
+the sum of Q in all test cases does not exceed 105
+1≤Di≤109 for each valid i
+1≤v≤1014
+
+Subtasks
+Subtask #1 (30 points): there is at most one query of the first type
+
+Subtask #2 (30 points): all queries of the first type appear before any queries of the second type
+
+Subtask #3 (40 points): original constraints
+Example Input:-
+4
+5 6
+3 5 2 1 6
+1 4 2
+2 2
+1 2 3
+2 2
+2 5
+2 3
+6 8
+5 5 1 1 2 2
+1 4 1
+1 1 1
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+7 8
+8 3 5 1 5 3 8
+1 4 7
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+2 7
+3 4
+1 2 1
+1 1 10
+2 1
+2 2
+2 3
+
+Output:
+Example Output
+4.0000000000
+2.0000000000
+5.0000000000
+2.0000000000
+4.2500000000
+4.2500000000
+1.0000000000
+1.0000000000
+1.7500000000
+1.7500000000
+6.5000000000
+3.0000000000
+3.0000000000
+1.0000000000
+3.0000000000
+3.0000000000
+6.5000000000
+0.0000000000
+0.0000000000
+0.0000000000
+Explanation
+Example case 1: The pool is divided into 5 parts, the depths of the parts are 3 5 2 1 6, in first query we pour 2 cubic units of water into 4-th part, since both 3-th part and 5-th part are deeper than 4-th part then the water can't stay in 4-th part, 1 unit will go to left and 1 unit to right. the 1 unit that went to the right stayed in 5-th part and made its depth equal to 5, the 1 unit that went to the right couldn't stay in 3-th part because 2nd part is deeper than it so it moved to 2nd part and made its depth equal to 4.
+
+in the third query we pour 3 water units into 2nd part, in the beginning 2nd part is deeper than than 1st part and 3rd part so water will stay in 2nd part until its depth become 3 it will have same depth as 1st part so the remaining water will be evenly distributed between 1st and 2nd parts.
+
+Example case 2: in the first query we pour 1 cubic unit of water above 4th part, since it has same depth as 3rd part, and both 2nd and 5th parts are deeper than 4th part then 0.5 units of water will go to 5th part (and will be distributed equally between 5th and 6th parts) and 0.5 units of water will go to 2nd part (and will be ditributed equally between 1st and 2nd parts). so after first query depths of all parts will become (4.75 4.75 1.00 1.00 1.75 1.75).
+
+Example case 4: The pool overflowed so all parts has 0 depth
diff --git a/ASSIGNMENTS/Unusual game.md b/ASSIGNMENTS/Unusual game.md
new file mode 100644
index 00000000..662269c8
--- /dev/null
+++ b/ASSIGNMENTS/Unusual game.md
@@ -0,0 +1,28 @@
+#### Description
+Recently Chef invented a two player game. The game is played on a horizontal strip consisting of n cells that are numbered from left to right with consecutive integers from 1 to n.
+At the beginning of the game, a pawn is placed at the cell numbered x. The players make moves alternately, i.e. the first player makes all odd numbered moves (1st, 3rd, 5th and so on) and the second player all even numbered moves (2nd, 4th, 6th and so on). During the k-th move the player should move the pawn either exactly k cells to the left or exactly k cells to the right (provided the pawn doesn't land outside the strip). For example, in the k-th move, if the pawn is located at cell p before the move, it can be moved to either (p - k) or (p + k) if the appropriate cells are part of the strip . The player who is not able to make a move (i.e. both the above choices lead to cells outside of the strip) loses the game. Assume that both the players play optimally.
+Before trying to play the game himself, Chef wants to understand the game more. So, he wants to find the outcome of m such games,
+where in the i-th game the initial location of pawn is xi. Can you please help Chef in this?
+
+#### Input:
+The first line of the input contains an integer T denoting the number of test cases.
+For each test case, the first line of input contains two space separated integers ― n and m.
+The second line contains m space separated integers ― x1, x2, ..., xm.
+
+#### Output:
+For each test case, output a single line containing m space separated integers ― i-th of them should be an integer either 1 or 2,
+corresponding to the player that will win if the game starts with the pawn located at cell xi.
+
+#### Constraints:
+1 ≤ T ≤ 300
+1 ≤ the sum of n over all test cases ≤ 106
+1 ≤ m ≤ 50
+1 ≤ xi ≤ n
+
+#### Explanation:
+There are three cells in the horizontal strip.
+
+If the pawn is initially located at cell 2, during the first move it will be moved to either 1 or 3. The second player can later move the pawn to cell 3 or 1, respectively.
+Now, the first player has to move the pawn to three cells to the left or to the right, both of which end up moving the pawn outside the strip, so he is unable to make a move and will lose the game in this case. Hence, the second player wins the game.
+If the pawn is initially located at cell 3, the first player will have to move to cell 2 during first move and then the second player will be have no available move that can still keep the pawn on the strip,
+thus the second player loses the game. So, the first player is the winner in this case
diff --git a/ASSIGNMENTS/bfs_spanni_tree b/ASSIGNMENTS/bfs_spanni_tree
new file mode 100644
index 00000000..73f80712
--- /dev/null
+++ b/ASSIGNMENTS/bfs_spanni_tree
@@ -0,0 +1,5 @@
+There exist code we can find every where for creating a spannig tree for a given graph
+but what if we want to create a spanning tree for just
+one level or only some extend as
+
+ like a cude and we just want spannig tree for one side -mean level one or fractals and we want to make spanning tree form inner fractul
diff --git a/ASSIGNMENTS/fibonacci.md b/ASSIGNMENTS/fibonacci.md
new file mode 100644
index 00000000..ea1f218e
--- /dev/null
+++ b/ASSIGNMENTS/fibonacci.md
@@ -0,0 +1,12 @@
+The Fibonacci Sequence is the series of numbers:
+
+#### 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
+
+The next number is found by adding up the two numbers before it.
+
+
+
The 2 is found by adding the two numbers before it (1+1)
+
The 3 is found by adding the two numbers before it (1+2),