Skip to main content

All Questions

8votes
3answers
2kviews

A* (shortest path) with the ability to remove up to one wall

Problem You are given an HxW matrix. Each element is either 0 (passable space) or 1 (wall). Given that you can remove one wall, find the shortest path from [0,0] (start) to [width-1, height-1] (end). ...
Martin's user avatar
3votes
1answer
462views

How to design shopping cart Java application which satisfy modular, extensible and maintainable

I am new in Application Design. I have use-case as below As per the above story I have implemented code as below without any Modularity, Extensible and Maintainable. Could someone share the thoughts ...
Uday Kiran's user avatar
3votes
3answers
787views

An in memory Url Shortener in Java

This is a popular question in machine coding rounds. The requirements are to build a URL shortener. There are certain registered users who have the capability to define a URL and an optional time to ...
Suryasis Paul's user avatar
5votes
3answers
3kviews

Mars Rover technical Challenge in OOP

I am trying to practice OOP and TDD concepts, I have written this code for Mars rover challenge from marsrovertechchallenge . Can you please review my code from my GitHub repository? Or you can ...
Sara Elmenshawy's user avatar
3votes
2answers
700views

Banking application for Udemy Java course

I just "finished" a Udemy Java that involves building a banking application. Here is the problem definition: Scenario: You are a back-end developer and need to create an application to handle new ...
suky's user avatar
0votes
2answers
174views

A simple card game simulator

This is a homework question, and I have written the code but wasn't sure if I had picked the right data structure for this job and minimised time complexity. Can anyone give me some feedback, anything ...
Prashin Jeevaganth's user avatar
6votes
2answers
2kviews

Predict mars robot position

Description A robot lands on Mars, which happens to be a cartesian grid; assuming that we hand the robot these instructions, such as LFFFRFFFRRFFF, where "L" is a "turn 90 degrees left", "R" is a "...
CodeYogi's user avatar
4votes
3answers
101views

Print the first, last, and in-between integers of a range

Given our spec from Code Golf: Given two integers, output the two integers, and then the range between them. The order of the range must be the same as the input. Examples: ...
Marco Tulio Avila Cerón's user avatar
2votes
2answers
4kviews

Designing a book library

Description: Design a book library which maintains the book inventory. The library should allow an user to favorite/un-favorite book. The library should allow an user to rent a book for a given ...
CodeYogi's user avatar
0votes
2answers
184views

Verifying if two numbers are equal using ArrayLists

I have some question about the code below. It works correctly, but: Is there a better/another way to solve the exercise (as an expert would have done:) or mine it's perfectly done? Also, I don't see ...
I likeThatMeow's user avatar
1vote
1answer
749views

Count number of leaves in binary tree

Description: Given a binary tree find the number of leaves. Although the problem is simple and has been solved many times I am more interested in find object oriented ways to solve the algorithmic ...
CodeYogi's user avatar
10votes
2answers
22kviews

Parking lot OO design

I have tried to design the parking lot problem. Here is the problem statement. Design a parking lot system where Admin can look up all the available spots for parking, He should be able to choose ...
Tiny Rick's user avatar
2votes
1answer
610views

Jesse and Cookies

Jesse loves cookies. He wants the sweetness of all his cookies to be greater than value K. To do this, Jesse repeatedly mixes two cookies with the least sweetness. ...
CodeYogi's user avatar
12votes
2answers
7kviews

"Merchants Guide to Galaxy" challenge

I have solved the classic "Merchants Guide to Galaxy" problem: A merchant buys and sells items in the galaxy. Buying and selling over the galaxy requires you to convert numbers and units. The ...
rd22's user avatar
  • 171
2votes
1answer
2kviews

Reading Input from file for sorting and rewriting

I am writing a program that reads a DAT file with names. The names are stored in an ArrayList of Type Name, the Name object can hold the first, middle and last name. Once the names are stored in the ...
Samuel.s's user avatar

153050per page
close