Ramp logo

Ramp

New York, NYFintech

Interview Questions

Calendar Application Design

Asked at Ramp
technical
system design
testing

Design and implement a Google Calendar-like application.

Core Features:

interface Event {
  id: string;
  title: string;
  start: Date;
  end: Date;
  attendees: string[];
}

class Calendar {
  addEvent(event: Event): void;
  editEvent(id: string, updates: Partial<Event>): void;
  deleteEvent(id: string): void;
}

// Unit Tests
describe('Calendar', () => {
  test('should add event', () => {
    // Test event creation
  });
  
  test('should handle overlapping events', () => {
    // Test conflict resolution
  });
  
  test('should validate event dates', () => {
    // Test date validation
  });
});

Requirements:

  1. Event Management
  • CRUD operations
  • Conflict detection
  • Recurring events
  • Attendee management
  1. Data Storage
  • Efficient event lookup
  • Date range queries
  • Concurrent modifications
  1. Testing Strategy
  • Unit test coverage
  • Edge case handling
  • Performance testing

Currency Exchange CLI Tool

Asked at Ramp
technical
cli
api integration

Design CLI tool for fetching currency exchange rates.

Interface:

interface ExchangeRate {
  date: string;
  from: string;
  to: string;
  rate: number;
}

interface CLIArgs {
  startDate: string;
  endDate: string;
  fromCurrency: string;
  toCurrency: string;
}

class ExchangeRateCLI {
  async fetchRates(args: CLIArgs): Promise<ExchangeRate[]>;
  formatOutput(rates: ExchangeRate[]): string;
}

Requirements:

  1. API Integration
  • Rate fetching
  • Error handling
  • Rate limiting
  1. Date Handling
  • Validation
  • Range processing
  • Timezone support
  1. Output Formatting
  • Table format
  • Rate trends
  • Summary statistics

User Location Tracker

Asked at Ramp
technical
algorithms
time tracking

Track user location based on flight history.

Data Structure:

interface Flight {
  userId: string;
  departureTime: Date;
  arrivalTime: Date;
  departureAirport: string;
  arrivalAirport: string;
}

function getUserLocation(
  flights: Flight[],
  userId: string,
  timestamp: Date
): string

Example:
flights = [
  {
    userId: "123",
    departureTime: "2024-01-01T10:00:00Z",
    arrivalTime: "2024-01-01T12:00:00Z",
    departureAirport: "JFK",
    arrivalAirport: "LAX"
  }
]

getUserLocation(flights, "123", "2024-01-01T11:00:00Z")
// Returns: "In flight JFK->LAX"

Dynamic React Component

Asked at Ramp
technical
react
frontend

Implement React component with multiple input types.

Component Interface:

interface Props {
  input?: boolean | any[] | any;
}

const DynamicComponent: React.FC<Props> = ({ input }) => {
  // Live date/time if input undefined/false
  // Array elements if input is array
  // Input value otherwise
}

// Example Usage:
<DynamicComponent /> // Live date/time
<DynamicComponent input={[1,2,3]} /> // Array elements
<DynamicComponent input="hello" /> // Direct value

Requirements:

  1. Live Updates
  • Second-by-second updates
  • Date formatting
  • Cleanup on unmount
  1. Array Handling
  • Unique keys
  • Empty array case
  • Large array performance
  1. General Display
  • Error boundaries
  • Loading states
  • Prop type validation

Case Style Converter

Asked at Ramp
technical
string manipulation
parsing

Convert snake_case to camelCase in code files.

Function:

function convertToCamelCase(code: string): string

Examples:
Input: "__variable_one__ _variable_two"
Output: "__variableOne__ _variableTwo"

Input: "_hello_world"
Output: "_helloWorld"

Requirements:
- Preserve leading/trailing underscores
- Handle multiple underscores
- Maintain other formatting

Door Access Control System

Asked at Ramp
technical
system design
security

Design system for managing door access control.

Core Components:

interface User {
  id: string;
  accessLevel: AccessLevel;
  department: string;
}

interface Door {
  id: string;
  location: string;
  requiredAccess: AccessLevel;
}

class AccessControl {
  grantAccess(user: User, door: Door): boolean;
  logAccess(user: User, door: Door, granted: boolean): void;
  updateAccessLevel(user: User, level: AccessLevel): void;
}

Requirements:
1. Access Levels
- Hierarchical permissions
- Department-based access
- Time-based restrictions

2. Security Features
- Access logging
- Breach detection
- Emergency override

3. System Design
- Real-time validation
- Offline capability
- Audit trail

Share Your Experience at Ramp