Company Shares - Model Equity and Compute Ownership Percentages
Interview Experience
Problem
You are building an equity management tool. Given a list of share issuances and transfers, compute each stakeholder's current share count and ownership percentage.
Operations:
- issue(to, shares) - issue new shares to a stakeholder.
- transfer(from, to, shares) - transfer shares between stakeholders.
- ownership() -> dict -
return {stakeholder: (shares, pct)} for all holders.
python
class CapTable:
def issue(self, to: str, shares: int): ...
def transfer(self, frm: str, to: str, shares: int): ...
def ownership(self) -> dict: ...
def total_shares(self) -> int: ...
Example:
cap = CapTable()
cap.issue("Alice", 1000)
cap.issue("Bob", 500)
cap.transfer("Alice", "Carol", 200)
cap.ownership() ->
{
"Alice": (800, 53.33%),
"Bob": (500, 33.33%),
"Carol": (200, 13.33%)
}
Follow-ups
- What happens if a transfer exceeds the sender's current holdings - raise or clamp?
- How would you model vesting schedules (shares unlock monthly over 4 years)?
- Add a dilution event: a new funding round issues shares and all existing percentages shrink.
- How would you audit the full history of ownership at any past date?
Full Details
Problem
You are building an equity management tool. Given a list of share issuances and transfers, compute each stakeholder's current share count and ownership percentage.
Operations:
- issue(to, shares) - issue new shares to a stakeholder.
- transfer(from, to, shares) - transfer shares between stakeholders.
- ownership() -> dict -
return {stakeholder: (shares, pct)} for all holders.
python
class CapTable:
def issue(self, to: str, shares: int): ...
def transfer(self, frm: str, to: str, shares: int): ...
def ownership(self) -> dict: ...
def total_shares(self) -> int: ...
Example:
cap = CapTable()
cap.issue("Alice", 1000)
cap.issue("Bob", 500)
cap.transfer("Alice", "Carol", 200)
cap.ownership() ->
{
"Alice": (800, 53.33%),
"Bob": (500, 33.33%),
"Carol": (200, 13.33%)
}
Follow-ups
- What happens if a transfer exceeds the sender's current holdings - raise or clamp?
- How would you model vesting schedules (shares unlock monthly over 4 years)?
- Add a dilution event: a new funding round issues shares and all existing percentages shrink.
- How would you audit the full history of ownership at any past date?
About This Question
This is a candidate experience report from a c3 ai interview during the phone round.