u/Different_Owl613

Optiver Interview Prep of Hacker rank Pair Programming

I have an upcoming first-round interview for Optiver. It is s technical hacker rank interview with an engineer. It will last 75 minute.

What can I expect from this around in terms for questions ?
Will it be LC style problems ?

reddit.com
u/Different_Owl613 — 4 days ago
▲ 0 r/csharp

C# Interview take home assignment rejected over complexity

The is well know US company offering full HR and Payroll services.

The assignment core logic is to calculate tax based on regime config of each country.
There are 3 regimes flat, percentage and progressive.

The assignment already had a poorly written code using all in a single file:
hardcoded sql,
manual string parsing decimal values,
single for loop

The task was to find bugs and fix them, improve code quality using solid principles.

My below solution was deemed too complex to make the cut.
I wanted feedback on whether my solution is indeed complex.

Create Host.
Setup DI.
Run Host.

Host run BackgroundWorker.

Worker fetches regime mapping for each country in db using store proc.
Now build factory that returns approriate tax calulator for each country.
Creates a map of country + calulator.

Fetch pending tax rows from db using store proc in batches.
For each row:
  look up map an run caluator.
  add result to a collection.

Send the collection to a store proc that updates in db.

If no more rows then signal host to exit.
reddit.com
u/Different_Owl613 — 9 days ago