Search Questions

Company: CISCO

#1

A Profitable Journey

A traveler moves through cities represented by an array of integers, where each integer indicates the money spent (negative) or earned (positive) in that city per day. The journey starts at city 0 and ends at city (n-1). The traveler can move to either an adjacent city or a city that is p steps away, where p is any prime number ending in 3.

Determine the maximum money th

Asked in: CISCO


Buyer: 0
Code Size:
#2

Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to m, there are x blocked cells. Their positions are specified by the array blockedPositions[i][] where blockedPositions[i][1] represents the row and blockedPositions[i][2] represents the column position, using 1-based indexing.

Starting from the top-left cell (1, 1), the goal is to reach the bottom-right cell (n, m) wi

Asked in: CISCO


Buyer: 0
Code Size: