Why they ask this: The most common warm-up problem; it checks whether you can trade memory for speed with a hash map.
Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target. Assume exactly one solution exists, and…
Why they ask this: Almost always the first question. It sets the tone and shows whether you can communicate clearly and stay relevant.
How to answer
Keep it to 60–90 seconds and make it about the job, not your life story. A simple structure is present → past → future:
Avoid: reading your CV line by line, family details, your SLC/SEE marks, or generic words like "hard-working" without proof.
Sample answer · STAR
Why they ask this: Software is built in teams; interviewers look for respect, communication and a focus on the outcome.
How to answer
Sample answer · STAR
Why they ask this: A fundamental algorithm; off-by-one errors in the loop are exactly what interviewers look for.
Given a sorted (ascending) array of distinct integers nums and a target, return the index of target, or -1 if it is not present. Your solution must run in O(log…
Why they ask this: The starting point for any Laravel interview; it shows you know where code belongs.
Answer
Why they ask this: The most common Eloquent performance bug; it shows you think about the queries your code runs.
Answer
Why they ask this: Joining tables is daily backend work and a staple of online tests in Nepal.
Answer
Why they ask this: An open-ended classic that shows how broad your understanding of the web is.
Answer
Why they ask this: A quick check of loops, indexes and the difference between bytes and characters.
Write a function that returns the reverse of a string. Try it without using a built-in reverse helper first. Example
Why they ask this: Tests whether you understand the role and can connect your skills to the company's needs with evidence.
How to answer
Sample answer · STAR
Why they ask this: Tests the two-pointer technique and careful handling of edge cases like spaces and punctuation.
A phrase is a palindrome if, after converting all letters to lowercase and removing every non-alphanumeric character, it reads the same forwards and…
Why they ask this: The company wants to know whether you fit their budget and whether you have researched the market.
How to answer
Sample answer · STAR
"I'm Anisha, a BSc CSIT graduate from Tribhuvan University, and I focus on frontend development with React and TypeScript.
(Situation/Task) For my final-year project, our team of three built a bus-ticket booking web app for a local transport company in Pokhara, and I owned the whole frontend.
(Action) I built the seat-selection screen in React, connected it to our Laravel API, and made it work well on cheap Android phones because most of their customers book on mobile.
(Result) The company used it as a pilot for two routes, and I learnt how much real users care about speed and simple design. After that I did a three-month internship at a Kathmandu startup, where I fixed UI bugs and wrote my first unit tests.
I'm now looking for a junior frontend role where I can keep building products used by real people, and your team's work on [product] is exactly that kind of work."
Use STAR and focus on your actions. Show that you listened, kept it about the work (not the person), found a fair solution, and that the project benefited.
Avoid: blaming a teammate, a story where you "won" the argument, or saying you have never had a conflict.
Situation: In our final-year project, two teammates and I were building a college attendance app. One teammate wanted to switch from React to Vue three weeks before our internal demo because he was more comfortable with it.
Task: As the person handling the frontend integration, I needed us to agree quickly without hurting the team.
Action: I asked to talk one to one first and listened to his reasons. He was struggling with React state and felt behind. I suggested we keep React because two of us already had working screens, and I offered to pair-program with him for an hour each evening that week. I also split the tasks so he owned the reports screen, which used simpler components.
Result: We finished the demo on time, he became confident with React hooks, and our supervisor rated the project "excellent". I learnt that many technical disagreements are really about confidence or workload, and that solving the real issue works better than arguing about tools.
MVC (Model–View–Controller) separates an application into three parts:
app/Models), each mapped to a database table.resources/views), or JSON from API Resources in an API.app/Http/Controllers).The flow: route (routes/web.php or routes/api.php) → middleware → controller → model → view or JSON response.
Route::get('/jobs/{job}', [JobController::class, 'show']);
class JobController extends Controller
{
public function show(Job $job) // route model binding
{
return view('jobs.show', ['job' => $job]);
}
}In bigger apps, keep controllers thin and move business logic into service or action classes.
The N+1 problem happens when you load a list (1 query) and then run one more query per item to load a relationship (N queries).
// 1 query for posts + 1 query per post for its author = N+1
$posts = Post::all();
foreach ($posts as $post) {
echo $post->author->name;
}Fix it with eager loading, which loads the relationship for all rows in one extra query:
$posts = Post::with('author')->get(); // 2 queries in total
$posts = Post::with(['author', 'comments'])->get();
$count = Post::withCount('comments')->get(); // comments_count without loading themFind N+1 problems with Laravel Debugbar or Telescope, or make them fail loudly in development with Model::preventLazyLoading(! app()->isProduction());.
NULL.UNION.-- Every company, with its job count (including companies with no jobs)
SELECT c.name, COUNT(j.id) AS jobs
FROM companies c
LEFT JOIN jobs j ON j.company_id = c.id
GROUP BY c.id, c.name;Note that COUNT(j.id) counts only matched rows, while COUNT(*) would count 1 for a company with no jobs.
https), host and path.GET /jobs with headers and cookies.Go deeper on whichever part matches the role you are applying for.
Match their needs (from the job description) to your proof. Pick the top two or three requirements and give one concrete example for each, then end with your attitude to learning.
Avoid: comparing yourself with other candidates, or vague claims ("I am a fast learner") with no example.
"Your job description asks for three things: Laravel APIs, MySQL, and working with a frontend team.
(Situation/Task) In my internship at a fintech company in Lalitpur, I was asked to build the API for a loan-application form used by their React team.
(Action) I designed the tables, wrote validation with Form Requests, documented every endpoint in Postman, and met the frontend developer daily so the JSON matched what the UI needed.
(Result) The feature went live on schedule, and the team lead asked me to write the API for the next module too.
So you would get someone who has already shipped this exact kind of work, communicates early, and is honest about what I still need to learn, which right now is writing better automated tests."
Avoid: saying "anything is fine", giving a single number far above the market, or using your personal expenses as the reason.
"Based on my research on salary data and job posts for junior React developers in Kathmandu with internship experience, I'm looking for around NPR 35,000 to 45,000 per month before tax.
That said, I'm flexible. Learning opportunities, mentorship and benefits like PF and festival allowance matter to me too. Could you share the budgeted range for this role?"
(Replace the numbers with your own research: ranges change with the role, city, company size and your skills.)