Search results
CPP Solutions for Hackerrank Problems. Contribute to utkarshiniacharya/Hackerrank-Solutions development by creating an account on GitHub.
Waiter | HackerRank Solutions. Problem Statement : You are a waiter at a party. There is a pile of numbered plates. Create an empty answers array. At each iteration, i, remove each plate from the top of the stack in order. Determine if the number on the plate is evenly divisible ith the prime number. If it is, stack it in pile Bi.
Complete the waiter function in the editor below. waiter has the following parameters: int number[n]: the numbers on the plates ; int q: the number of iterations ; Returns. int[n]: the numbers on the plates after processing
In this HackerRank in Data Structures - Waiter solutions. You are a waiter at a party. There is a pile of numbered plates. Create an empty answers array. At each iteration, i remove each plate from the top of the stack in order. Determine if the number on the plate is evenly divisible by the i**th prime number.
Complete the waiter function in the editor below. waiter has the following parameters: int number[n]: the numbers on the plates; int q: the number of iterations; Returns. int[n]: the numbers on the plates after processing; Input Format. The first line contains two space separated integers, and .
java solution. class Result { /* * Complete the 'waiter' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts following parameters: * 1. INTEGER_ARRAY number. * 2. INTEGER q. */ public static boolean isprime(int n ) { for (int i = 2 ; i <= n+2 ; i++) { if ( i!=n && n%i==0) {
A collection of solutions for Hackerrank data structures and algorithm problems in Python - dhruvksuri/hackerrank-solutions
Feb 10, 2016 · Short Problem Definition: You are a waiter at a party. There are NN stacked plates. Each plate has a number written on it. You start picking up the plates from the top one by one and check whether the number written on the plate is divisible by a prime….
⭐️ Content Description ⭐️In this video, I have explained on how to solve waiter problem by preprocessing prime numbers and list operations in python. This ha...
My HackerRank solutions. Contribute to charles-wangkai/hackerrank development by creating an account on GitHub.