CS FundamentalsVery hardGATE CS · Product-company placement
A three-way merge compares five separate regions of a file. Base / ours / theirs: R1 a / a / a; R2 b / B1 / b; R3 c / c / C2; R4 d / D1 / D2; R5 e / E1 / E1. How many regions end in a merge conflict?
- A. 3
- B. 2
- C. 0
- D. 1
Correct answer: D. 1
A region changed on only one side takes that side (R2 → B1, R3 → C2), and the identical change on both sides merges cleanly (R5). Only R4, changed differently on both sides, conflicts. Comparing ours with theirs directly (without the base) would wrongly flag R2, R3 and R4.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A project uses Conventional Commits with automated semantic versioning. Since v1.4.2 the commits are 'fix(api): handle empty body'…
- A team lead says: 'We know this shortcut will hurt later, but we must ship for the demo and will pay it back next sprint.' In Fowler's…
- A bank must replace a large legacy system without a risky big-bang cut-over. It puts a routing façade in front of it, moves one capability…
- A service calls three downstream APIs using one shared pool of 200 threads. When one API becomes very slow, all 200 threads end up waiting…
- In STRIDE threat modelling, a user denies having approved a large transfer, and the system cannot prove otherwise. Which threat is this…
- A forum shows user comments, and an attacker posts a comment containing a script tag that runs in other users' browsers. Which is the…