# Conversion ratios between symbols: algorithm interview question

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/2275/conversion-ratio-symbols
Source observed: 2026-11-05T00:29:20.187Z
Last checked: 2026-11-05T00:29:20.187+00:00
Indexed: 2026-11-07T00:59:22.712+00:00

---

# Conversion ratios between symbols

**Difficulty:** Hard  
**Interview category:** Data Structures & Algorithms  
**Question types:** Coding, Technical  
**Associated role:** [Software Engineer](https://www.aced.io/questions?role=swe)  
**Associated company:** [Snap](https://www.aced.io/questions?company=snap)  
**Reported last asked:** 4 years ago

## Problem

Calculate conversion ratios. Given a list of conversion pairs between different units of measurement, write an algorithm that returns the conversion ratio from one unit to another, either directly or through a series of conversions. Return `None` when no conversion is possible.

Each conversion is represented as `(source symbol, destination symbol, ratio)`. Your algorithm should be able to chain ratios across multiple conversions and reverse a conversion when the required direction is opposite the supplied pair.

## Example

Given:

```text
conversions = [
    ('USD', 'EUR', 0.88),
    ('EUR', 'JPY', 129.53),
    ('GBP', 'USD', 1.39)
]
```

- `source = 'USD'`, `destination = 'JPY'` → `114.0064` (`0.88 * 129.53`)
- `source = 'GBP'`, `destination = 'EUR'` → `1.2232` (`1.39 * 0.88`)
- `source = 'EUR'`, `destination = 'GBP'` → `None` because no direct or indirect conversion is available in that direction.

## Access and practice controls

We mark this question as Hard. Detailed company statistics require an [Upgrade](https://www.aced.io/upgrade?src=questions). The question workspace includes Question, Solution, Mock Interview, and Community tabs; the rendered controls indicate three community items. Running code requires [sign-up](https://www.aced.io/signup?src=lesson).

## Community

No answers have been contributed by the community yet.

## Related questions

- [Closest pair of points](https://www.aced.io/questions/4630/closest-pair): Given an array of points on a plane `(x,y)`, write a function to return the distance between the closest pair of points.
- [Batch packing / bin optimization](https://www.aced.io/questions/4910/batch-packing-bin-optimization): Given a list of items with different sizes, write an algorithm to pack them into the minimum number of batches without exceeding each batch's capacity.
- [Trades, buy/sell pairs, and profit](https://www.aced.io/questions/1222/trades-buy-sell-pairs-profit): Given a list of trades, iterate to return buy/sell pairs and overall profit.

## Related courses

### [Software Engineering Interview Prep](https://www.aced.io/courses/software-engineering)

![Software Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/4VkuYewBHUFIVUS5oJDW5h/02e833439b1289f25f38f13f81cbdca3/adobe_stock_optimized.jpeg?w=800&h=800&fm=webp&q=75)

We help candidates prepare for software engineering roles at Google, Amazon, Microsoft, Meta, Apple, and other top companies through mock interviews, frameworks, and advice from senior candidates. Topics include data structures, algorithms, system design, people management, and behavioral interviews.

### [System Design Interviews](https://www.aced.io/courses/system-design-interviews)

![System Design Interviews](https://images.ctfassets.net/x78yjrjc11pq/78x7miFZFjBCrM5GqftrMJ/2f6d26e632c4e7265c49f6a180227edb/system_design_track_compressed_26ac98a46e__281_29_5be2280f31.jpeg?w=800&h=800&fm=webp&q=75)

We teach candidates how to answer current system design questions across product, infrastructure, and AI domains with in-depth video examples, written breakdowns, reference patterns, and mock interviews featuring senior engineers and managers.

## Aced interview-preparation offerings

We provide interview courses and practice across Product Management, Forward Deployed Engineering, Engineering Management, Software Engineering, System Design, Data Science, Machine Learning, Data Engineering, AI Engineering, Investment Banking, Generative AI, Security Engineering, Technical Program Management, Solutions Architecture, UX / Product Design, and BizOps & Strategy. We also offer Loops, Experiences, Practice, Mock Interviews & Coaching, Resume Review, and Salary Negotiation.

[All Questions](https://www.aced.io/questions) · [Sign up](https://www.aced.io/signup?src=nav) · [Log in](https://www.aced.io/login?src=nav)

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F2275%2Fconversion-ratio-symbols&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F2275%2Fconversion-ratio-symbols). Opening a form does not execute a tool.