Code Monkey home page Code Monkey logo

medha-b's Projects

android-p2p icon android-p2p

Small app to create a wifi direct network via android wifip2p

apkgolf icon apkgolf

The smallest Android APK in the world

clad icon clad

clad -- automatic differentiation for C/C++

consumerfinancemanagement icon consumerfinancemanagement

The product which user will purchase; some processing fee will be taken from the user which will be an earning resource for the company. The users will be able to view their purchased products in Dashboard and how much amount they are supposed to pay in upcoming months.

deeplearning4j icon deeplearning4j

Eclipse Deeplearning4j, ND4J, DataVec and more - deep learning & linear algebra for Java/Scala with GPUs + Spark

hackerearth_problem_anagrams icon hackerearth_problem_anagrams

Given two strings, a and b , that may or may not be of the same length, determine the minimum number of character deletions required to make a and b anagrams. Any characters can be deleted from either of the strings.

hackerrank_poblem_connectingtowns icon hackerrank_poblem_connectingtowns

Gandalf is travelling from Rohan to Rivendell to meet Frodo but there is no direct route from Rohan (T1) to Rivendell (Tn). But there are towns T2,T3,T4...Tn-1 such that there are N1 routes from Town T1 to T2, and in general, Ni routes from Ti to Ti+1 for i=1 to n-1 and 0 routes for any other Ti to Tj for j ≠ i+1 Find the total number of routes Gandalf can take to reach Rivendell from Rohan. Credits to HackerRank for the problem and main().

hackerrank_problem_2darray icon hackerrank_problem_2darray

Given a 6X6 2D Array. There are 16 hourglasses in array , and an hourglass sum is the sum of an hourglass' values. Calculate the hourglass sum for every hourglass in array , then print the maximum hourglass sum. Credits to HackerRank for the problem and main().

hackerrank_problem_armygame icon hackerrank_problem_armygame

Luke is daydreaming in Math class. He has a sheet of graph paper with n rows and m columns, and he imagines that there is an army base in each cell for a total of n.m bases. He wants to drop supplies at strategic points on the sheet, marking each drop point with a red dot. If a base contains at least one package inside or on top of its border fence, then it's considered to be supplied. What is the minimum number of packages that Luke must drop to supply all of his bases? Credits to HackerRank for the problem and main().

hackerrank_problem_bestdivisor icon hackerrank_problem_bestdivisor

Kristen loves playing with and comparing numbers. She thinks that if she takes two different positive numbers, the one whose digits sum to a larger number is better than the other. If the sum of digits is equal for both numbers, then she thinks the smaller number is better. Given an integer,n , can you find the divisor of n that Kristin will consider to be the best?

hackerrank_problem_countingvalleys icon hackerrank_problem_countingvalleys

Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last hike he took exactly steps. For every step he took, he noted if it was an uphill, , or a downhill, step. Gary's hikes start and end at sea level and each step up or down represents a unit change in altitude. We define the following terms: A mountain is a sequence of consecutive steps above sea level, starting with a step up from sea level and ending with a step down to sea level. A valley is a sequence of consecutive steps below sea level, starting with a step down from sea level and ending with a step up to sea level. Given Gary's sequence of up and down steps during his last hike, find and print the number of valleys he walked through. For example, if Gary's path is , he first enters a valley units deep. Then he climbs out an up onto a mountain units high. Finally, he returns to sea level and ends his hike. Function Description Complete the countingValleys function in the editor below. It must return an integer that denotes the number of valleys Gary traversed. countingValleys has the following parameter(s): n: the number of steps Gary takes s: a string describing his path Input Format The first line contains an integer , the number of steps in Gary's hike. The second line contains a single string , of characters that describe his path. Constraints Output Format Print a single integer that denotes the number of valleys Gary walked through during his hike.

hackerrank_problem_findpoint icon hackerrank_problem_findpoint

Consider two points, and . We consider the inversion or point reflection, , of point across point to be a rotation of point around . Given sets of points and , find for each pair of points and print two space-separated integers denoting the respective values of and on a new line. Input Format The first line contains an integer, , denoting the number of sets of points. Each of the subsequent lines contains four space-separated integers describing the respective values of , , , and defining points and . CoOutput Format For each pair of points and , print the corresponding respective values of and as two space-separated integers on a new line. Credits to HackerRank for the problem and main().

hackerrank_problem_handshake icon hackerrank_problem_handshake

At the annual meeting of Board of Directors of Acme Inc, every one starts shaking hands with everyone else in the room. Given the fact that any two persons shake hand exactly once, Can you tell the total count of handshakes? Input Format The first line contains the number of test cases T, T lines follow. Each line then contains an integer N, the total number of Board of Directors of Acme. Output Format Print the number of handshakes for each test-case in a new line.

hackerrank_problem_jumpclouds icon hackerrank_problem_jumpclouds

Emma is playing a new mobile game that starts with consecutively numbered clouds. Some of the clouds are thunderheads and others are cumulus. She can jump on any cumulus cloud having a number that is equal to the number of the current cloud plus or . She must avoid the thunderheads. Determine the minimum number of jumps it will take Emma to jump from her starting postion to the last cloud. It is always possible to win the game. For each game, Emma will get an array of clouds numbered if they are safe or if they must be avoided. For example, indexed from . The number on each cloud is its index in the list so she must avoid the clouds at indexes and . She could follow the following two paths: or . The first path takes jumps while the second takes . Function Description Complete the jumpingOnClouds function in the editor below. It should return the minimum number of jumps required, as an integer. jumpingOnClouds has the following parameter(s): c: an array of binary integers Input Format The first line contains an integer , the total number of clouds. The second line contains space-separated binary integers describing clouds where . Constraints Output Format Print the minimum number of jumps needed to win the game.

hackerrank_problem_leftrotation icon hackerrank_problem_leftrotation

A left rotation operation on an array shifts each of the array's elements unit to the left. For example, if left rotations are performed on array , then the array would become . Given an array of integers and a number, , perform left rotations on the array. Return the updated array to be printed as a single line of space-separated integers. Function Description Complete the function rotLeft in the editor below. It should return the resulting array of integers. rotLeft has the following parameter(s): An array of integers . An integer , the number of rotations. Input Format The first line contains two space-separated integers and , the size of and the number of left rotations you must perform. The second line contains space-separated integers . Output Format Print a single line of space-separated integers denoting the final state of the array after performing left rotations. Credits to HackerRank for the problem and the main().

hackerrank_problem_leonardoprime icon hackerrank_problem_leonardoprime

Leonardo loves primes and created q queries where each query takes the form of an integer,n . For each n, he wants you to count the maximum number of unique prime factors of any number in the inclusive range [1,n] and then print this value on a new line.

hackerrank_problem_maximumdraws icon hackerrank_problem_maximumdraws

Jim is off to a party and is searching for a matching pair of socks. His drawer is filled with socks, each pair of a different color. In its worst case scenario, how many socks (x) should Jim remove from his drawer until he finds a matching pair? Input Format The first line contains the number of test cases T. Next T lines contains an integer N which indicates the total pairs of socks present in the drawer. Output Format Print the number of Draws (x) Jim makes in the worst case scenario.

hackerrank_problem_papersquares icon hackerrank_problem_papersquares

Mary has an nXm piece of paper that she wants to cut into 1X1 pieces. Print the minimum number of cuts Mary must make to cut the paper into n.m squares that are 1X1 unit in size. Credits to HackerRank for the problem and main().

hackerrank_problem_repeatedstrings icon hackerrank_problem_repeatedstrings

Lilah has a string, , of lowercase English letters that she repeated infinitely many times. Given an integer, , find and print the number of letter a's in the first letters of Lilah's infinite string. For example, if the string and , the substring we consider is , the first characters of her infinite string. There are occurrences of a in the substring. Function Description Complete the repeatedString function in the editor below. It should return an integer representing the number of occurrences of a in the prefix of length in the infinitely repeating string. repeatedString has the following parameter(s): s: a string to repeat n: the number of characters to consider Input Format The first line contains a single string, . The second line contains an integer, . Constraints For of the test cases, . Output Format Print a single integer denoting the number of letter a's in the first letters of the infinite string created by repeating infinitely many times. Credits to HackerRank for the problem and main function.

hackerrank_problem_restaurant icon hackerrank_problem_restaurant

Martha is interviewing at Subway. One of the rounds of the interview requires her to cut a bread of size lXb into smaller identical pieces such that each piece is a square having maximum possible side length with no left over piece of bread.

hackerrank_problem_reversegame icon hackerrank_problem_reversegame

Akash and Akhil are playing a game. They have balls numbered from 0 to n-1. Akhil asks Akash to reverse the position of the balls, i.e., to change the order from say, 0,1,2,3 to 3,2,1,0. He further asks Akash to reverse the position of the balls times, each time starting from one position further to the right, till he reaches the last ball. So, Akash has to reverse the positions of the ball starting from position, then from position, then from position and so on. At the end of the game, Akhil will ask Akash the final position of any ball numbered . Akash will win the game, if he can answer. Help Akash.

hackerrank_problem_sockmerchant icon hackerrank_problem_sockmerchant

John works at a clothing store. He has a large pile of socks that he must pair by color for sale. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are. For example, there are socks with colors . There is one pair of color and one of color . There are three odd socks left, one of each color. The number of pairs is . Function Description Complete the sockMerchant function in the editor below. It must return an integer representing the number of matching pairs of socks that are available. sockMerchant has the following parameter(s): n: the number of socks in the pile ar: the colors of each sock Input Format The first line contains an integer , the number of socks represented in . The second line contains space-separated integers describing the colors of the socks in the pile. Constraints where Output Format Return the total number of matching pairs of socks that John can sell.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.