CareerCup

Coding Challenge

Design a class for converting integer to Roman numerals.

CareerCups interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

How you will design and make a website like Hackerrank? How you will measure and limit the running time and memory usage of the program.

What is the issue with this Producer Consumer Problem. Can you fix it.

Most engineers make critical mistakes on their resumes — we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we get what youre saying.

Find whether you will be able to make change for every customer in the queue. You must serve customers in the order they come in.

Each customer is holding a bill of $5, $10 or $20.

Take an input and output the number of consecutive numbers in a row, or what you would say if you were to read it out loud ex input: 111222289 three ones three fours one eight one nine 31421819

A queue of people are waiting to buy ice cream from you.

is a comprehensive book on getting a job at a top tech company, whilefocuses on dev interviews anddoes this for PMs.

Each person buys one ice cream, which sells for $5.

Our Mock Interviews will be conducted in character just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know youll get a true-to-life experience.

public class ProducerConsumerProb public static void main(String[] args) Container container = new Container(); Turn turn = Turn.PRODUCER; Producer p = new Producer(container, turn); Consumer c = new Consumer(container, turn); Thread pro = new Thread(p); Thread con = new Thread(c); pro.start(); con.start(); public static class Producer implements Runnable Container container; Turn turn; public Producer(Container integer,Turn turn) ntainer = integer; this.turn = turn; @Override public void run() for(int i=0;i10;i++) Turn temp = null; while(true) synchronized (turn) temp = turn; if(temp == Turn.PRODUCER) break; synchronized (turn) container.setI(i); turn = Turn.CONSUMER; public static class Consumer implements Runnable Container container; Turn turn; public Consumer(Container integer,Turn turn) this.container = integer; this.turn = turn; @Override public void run() for(int i=0;i10;i++) Turn temp = null; while(true) synchronized (turn) temp = turn; if(temp == Turn.CONSUMER) break; synchronized (turn) System.out.println(container.getI()); turn = Turn.PRODUCER; public static class Container Integer i = new Integer(0); public int getI() return i; public void setI(int i) this.i = i; enum Turn PRODUCER,CONSUMER;

Leave a Reply