Showing posts with label Search. Show all posts
Showing posts with label Search. Show all posts

Saturday, February 23, 2019

Making Candies - Hacker Rank Solution

Karl loves playing games on social networking sites. His current favorite is CandyMaker, where the goal is to make candies.
Karl just started a level in which he must accumulate  candies starting with  machines and  workers. In a single pass, he can make  candies. After each pass, he can decide whether to spend some of his candies to buy more machines or hire more workers.

Maximum Subarray Sum - Hacker Rank Solution

We define the following:
  • subarray of array  of length  is a contiguous segment from  through  where .
  • The sum of an array is the sum of its elements.

Minimum Time Required - Hacker Rank Solution

You are planning production for an order. You have a number of machines that each have a fixed number of days to produce an item. Given that all the machines operate simultaneously, determine the minimum number of days to produce the required order.

Triple sum - Hacker Rank Solution

Given  arrays  of different sizes, find the number of distinct triplets  where  is an element of , written as , and , satisfying the criteria: .

Pairs - Hacker Rank Solution

You will be given an array of integers and a target value. Determine the number of pairs of array elements that have a difference equal to a target value.

Swap Nodes [Algo] - Hacker Rank Solution

A binary tree is a tree which is characterized by one of the following properties:
  • It can be empty (null).
  • It contains a root node only.

Hash Tables: Ice Cream Parlor - Hacker Rank Solution

Check out the resources on the page's right side to learn more about binary search. The video tutorial is by Gayle Laakmann McDowell, author of the best-selling interview book Cracking the Coding Interview.
Powered by Blogger.