Fragen im Vorstellungsgespräch bei Bloomberg L.P.: Suppose there is a rectangula... | Glassdoor.de

## Frage im Vorstellungsgespräch

Financial Software Developer Intern-Vorstellungsgespräch New York, NY (Vereinigte Staaten von Amerika)

# Suppose there is a rectangular map where you can only

travel up or right to go from a start location in the bottom left corner to the top right corner, and each move is discrete. Write a program that prints all possible solutions to get from the start to finish.
Antwort

## Antwort im Vorstellungsgespräch

4 Antworten

2

Suppose you need 5 R (right moves) and 5 T (top moves) to reach the upper right corner. Then you can do a permutation of the string, "RRRRRTTTTT" to get all the possible paths.

Sid Ray am 07.03.2010
0

@Sid Ray: Thanks for the hint.

Anonym am 08.03.2010
0

Thx for a nice hint.

Anonym am 15.03.2010
4

#include

using namespace std;

const int maxx = 5;
const int maxy = 5;

void printpath(int x = 1, int y = 1, string path = "")
{
if(x

Anonymous am 11.04.2012

## Antwort oder Kommentar posten

Um dies zu kommentieren, bitte anmelden oder Konto anlegen.