← Back to Directory

Block (Square)

Large Enterprises

Block, formerly known as Square, is a financial technology and digital payments company that provides tools for businesses and individuals. It is known for its point-of-sale hardware and software, the Cash App peer-to-peer payment service, and initiatives in cryptocurrency and blockchain technology.

2 interview notes · updated Jul 2026

Block (Square)·Data Scientist·Technical Phone Screen

Jun 2026
Block (Square) data scientist technical screen, basically one long coding problem about graph traversal on a referral dataset. The question had a lot of moving parts and I'm still not sure I nailed the complexity justification.
  • Given a directed referral graph loaded from a CSV (up to 1 million users, nullable referred_by, possible duplicates and cycles), implement a function that returns the referral chain from the earliest ancestor down to a given user. If a cycle is detected on the path, return both the cycle nodes in encounter order and the acyclic prefix leading into it.
  • Compute root_ancestor and chain_depth for every user in O(n) time and O(n) space without recomputing paths from scratch for each user. Justify your complexity.
  • Return the top 3 longest valid acyclic chains, with ties broken first by smaller root ancestor ID and then lexicographically by the full chain list.
  • Describe and implement preprocessing for the CSV input: deduplicate rows keeping the earliest seen parent when conflicts exist, normalize null or empty referred_by values, handle referred_by values not present in the user list by treating them as external roots, and flag self-referrals.
  • Write minimal unit tests covering an acyclic chain, a self-cycle, and a two-node cycle using the provided example rows.

“This was the core of the whole interview.”

View Post

Block (Square)·Data Scientist·Technical Phone Screen

Apr 2026
SQL-heavy technical screen for a DS role at Block. Five questions, all written SQL, centered on a referral/orders schema. No behavioral stuff at all, just pure query writing under pressure.
  • Given a referrals and orders table, write a query that returns, for each referrer, the count of distinct referred users, the count of those who placed an order in the last 7 days, and total revenue in that window. Referrers with zero buyers should still appear.
  • Find all users who appear as referred_user_id in the referrals table but have placed zero orders on or before today. Use a LEFT JOIN to orders and HAVING to enforce the zero-order condition.
  • For each country, among users who were referred, compute the number of referred users, the number who bought something on or before today, and the conversion rate rounded to two decimals. Countries with zero referred users should be excluded, but countries with zero buyers should be included.
  • The business asks you to filter metrics to country='UK', but the data uses 'GB'. Show how you would first surface the actual values in the country column before writing the real query, and explain in a comment why a naive WHERE country='UK' is dangerous.
  • You're in an interview where only the interviewer can run queries. What are the first two exploratory SELECTs you'd ask them to execute before attempting the main questions?

“The LEFT JOIN part is what trips people up.”

View Post