Question 1: String Replace Without Using Built-in Functions
Implement a function that will take three Strings as arguments and return the first string
with all instances of the second string replaced by the third string.
Do not use any of the standard regexp functions or string replace functions.
Example:
replace("AFoxRunsInTheField", "Fox", "Cat") => "ACatRunsInTheField"
Restriction: don't use string.replace or regex replace
Question 2: LinkedIn Connection Distance
LinkedIn is designed to connect people together, so that in people search and other related
areas LinkedIn will show a connection distance between two users.
E.g., Bob connects with Alice, and Alice connects with Frank, assuming there is no other
connections, then Bob and Frank's connection distance is 2.
interface MemberConnections {
// given a member, it will return all his/her connections,
// if no connections, the list is an empty list
List<Member> getConnections(Member member);
}
interface Member {
// a person's name
String getName();
// a unique member id
int getMemberId();}
// please implement
interface FindConnectionDistance {
/**
* get connection distance between two members
*/
int calculateConnectionDistance(Member member1, Member member2);
}
These questions reflect LinkedIn’s focus on fundamental implementation skills and graph-based reasoning. The string replacement problem tests low-level string traversal and edge-case handling without relying on built-in helpers. The connection distance problem maps directly to shortest path search in an unweighted graph. In live interviews, clarity of thought and explanation often matter more than code completeness.
VOPrep’s team has long accompanied candidates through real OA and VO interviews at top tech and finance companies, including OpenAI, Google, Amazon, Citadel, and SIG. We provide live interview assistance and proxy interview support, helping candidates maximize their chances of securing offers.