Reported January 2024
Goldman Sachsstring

Preprocess Dates

Reported by candidates from Goldman Sachs's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Goldman Sachs OA. Under 2s to a working solution.
Founder's read

Goldman Sachs pulled this in January 2024, and it's a string parsing problem disguised as busy work. You're given raw date data, probably in mixed formats, and you need to normalize it into a single format or extract specific components. Candidates blank on this because they overthink the regex or try to use a library when manual parsing is faster. StealthCoder will spot the exact format rules on screen and hand you the pattern in seconds.

Pattern and pitfall

The trick here is recognizing that 'preprocess' means you're not solving a complex algorithmic problem, you're just munging strings. The pattern is usually: detect format, parse each date, validate, then output in a standard form. Common pitfalls include assuming all dates use the same separator or digit count, forgetting edge cases like single-digit months, or parsing in the wrong order. The real work is in the string splitting and substring extraction, not in data structures. If you freeze on the exact parsing logic during the live OA, StealthCoder reads the input directly and tells you the delimiter and field positions immediately.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Preprocess Dates cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Goldman Sachs's OA.

Goldman Sachs reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Preprocess Dates FAQ

Is this really just string manipulation, or is there a hidden algorithm?+

It's string manipulation. No dynamic programming, no graph theory. Your job is to parse, validate, and format. The 'challenge' is handling multiple input formats cleanly without writing spaghetti code. Use split, substring, and basic validation.

What's the most common format trap candidates fall into?+

Assuming all dates use the same separator or field order. Goldman often mixes MM-DD-YYYY with DD/MM/YYYY or other variants in the same input. Read the problem statement carefully. If it's ambiguous, ask or infer from context.

Should I use a date library or parse manually?+

Manual parsing is safer. Libraries can throw exceptions on edge cases or unexpected formats. Stick to split, substring, and integer parsing. It's faster and shows you understand what you're doing.

How do I handle invalid dates like February 30th?+

The problem will tell you if validation is required. If it is, check day ranges per month and leap years. If the problem doesn't mention it, skip validation. Read the requirements first.

Can I solve this in 15 minutes?+

Yes. Parsing and formatting usually take 10-20 minutes depending on format complexity. The time sink is usually writing clean edge case handling, not the core logic. Plan for it.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Goldman Sachs.

OA at Goldman Sachs?
Invisible during screen share
Get it