TechHire NepalConnecting Talent, Building Careers
Find JobsCompaniesCourses
Find Talents
Sign inGet Started →
Find JobsCompaniesCourses
Find Talents
Sign inGet StartedHire Talent
TechHire Nepal

Nepal's #1 tech job platform. Connecting top talent with the best companies.

For Job Seekers

  • Browse Jobs
  • Companies
  • Tech Salaries
  • Interview Prep
  • Courses
  • Career Advice

For Employers

  • Post a Job
  • Talent Search
  • Pricing
  • Employer Dashboard

Company

  • About
  • Blog
  • Careers
  • Contact

Resources

  • Training Institutes
  • Projects
  • Tutorials
  • Roadmaps
  • Notes
  • Open Sources

Community

  • Discussions
  • Tech Events
  • Hackathons
  • Developer Meetups
  • Tech News

More

  • Help & Support
  • Salary Tax Calculator
  • Company Registration Guide
  • Labour Act

Stay in the loop

A weekly digest of the best tech articles and jobs in Nepal.

© 2026 TechHire Nepal. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
HomeInterview PrepQuestion bank
Question bank

Interview Questions, Answered Clearly

Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.

Type
TechnicalCodingHR / BehaviouralAll types
Role
All rolesFrontend DeveloperBackend DeveloperFull-Stack DeveloperMobile Developer
Topic
All topicsJavaScript10React7HTML & CSS7PHP & Laravel9SQL & Databases6HTTP & REST APIs6Git4OOP & Design4Flutter5React Native5Arrays & Hashing4Strings3Searching & Stacks2Logic Basics1HR Basics9
Level
AnyEasyMediumHard

22 questions

12
Behavioural (STAR)3
  • Why they ask this: Software is built in teams; interviewers look for respect, communication and a focus on the outcome.

    How to answer

    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.

    Sample answer · STAR

    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.

    Open full page
  • Why they ask this: The most common Eloquent performance bug; it shows you think about the queries your code runs.

    Answer

    Open full page
  • Why they ask this: An open-ended classic that shows how broad your understanding of the web is.

    Answer

    Open full page
  • 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

    Open full page
  • Why they ask this: Interviewers want to know whether you stayed active and how honestly you talk about setbacks.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: Checks self-awareness and whether you actively work on improving yourself.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: A classic dynamic programming problem that shows whether you can improve an O(n²) idea to O(n).

    Given an integer array nums with at least one element, find the contiguous subarray with the largest sum and return that sum. Example 1 Example 2

    Open full page
  • Why they ask this: Tests recursion and how you handle data of unknown depth, which is common with JSON from APIs.

    Given an array that can contain numbers and other arrays nested to any depth, return a single flat array with all the values in their original order. Example

    Open full page
  • Why they ask this: Deadlines are constant in software jobs; interviewers want to see prioritisation and calm, not heroics.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: Technology changes constantly, so companies hire juniors who can learn on their own.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: Middleware is how cross-cutting concerns like auth are handled; it shows you understand the request lifecycle.

    Answer

    Open full page
  • Why they ask this: Security basics are non-negotiable for backend roles.

    Answer

    Open full page

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).

php
// 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:

php
$posts = Post::with('author')->get();           // 2 queries in total
$posts = Post::with(['author', 'comments'])->get();
$count = Post::withCount('comments')->get();     // comments_count without loading them

Find N+1 problems with Laravel Debugbar or Telescope, or make them fail loudly in development with Model::preventLazyLoading(! app()->isProduction());.

  1. URL parsing: the browser works out the scheme (https), host and path.
  2. DNS lookup: the hostname is resolved to an IP address (browser cache → OS cache → resolver → root, TLD and authoritative name servers).
  3. TCP connection to the server on port 443 (a three-way handshake). HTTP/3 uses QUIC over UDP instead.
  4. TLS handshake: the server proves its identity with a certificate and both sides agree on encryption keys.
  5. HTTP request: for example GET /jobs with headers and cookies.
  6. Server side: a load balancer or web server (Nginx) passes the request to the app (Laravel or Node), which may query the database and returns a response, often via a CDN cache.
  7. Rendering: the browser parses HTML into the DOM and CSS into the CSSOM, runs JavaScript, builds the render tree, then does layout and paint.
  8. Extra requests load images, scripts and fonts, and caching headers decide what is reused next time.

Go deeper on whichever part matches the role you are applying for.

  • Research first: check salary data for your role and experience level in Nepal (for example TechHire salary insights), ask seniors, and read job posts that show salary bands.
  • Give a realistic monthly range in NPR, with the lower end being an amount you would genuinely accept.
  • Mention that you are flexible depending on the full package: festival bonus (Dashain allowance), provident fund (PF) and citizen investment trust (CIT) contributions, insurance, learning budget, and work-from-home days.
  • Ask whether the figure is gross or net of tax if it is unclear.
  • If asked very early, it is fine to ask about the role's budgeted range first.

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.)

Gaps are common, for example waiting for results, preparing for Lok Sewa, visa or family reasons, or a slow job market. Answer honestly and briefly, then move quickly to what you did to keep growing: courses, projects, freelancing, open-source work or volunteering.

Avoid: long excuses, blaming others, or pretending there was no gap.

"After my BE results in 2025, I spent about six months helping with our family business in Butwal while my father recovered from an illness.

(Task) I didn't want my skills to fall behind during that time.

(Action) I set myself a routine of two hours a day: I completed a Laravel course, built a stock-tracking app for our own shop, and published it on GitHub with a README and a live demo on Render.

(Result) The shop still uses that app, and the project taught me more about real requirements than any tutorial. Now that my family situation is stable, I'm fully focused on starting my career as a backend developer."

Choose a real, non-critical weakness (not a core requirement of the job), show what you are doing about it, and give evidence of improvement.

Avoid: fake weaknesses ("I'm a perfectionist", "I work too hard"), and weaknesses that disqualify you (for example "I can't work in a team" for a team role).

"My weakness has been speaking up in meetings, especially with senior people.

(Situation) During my internship, I noticed an issue in an API response format but didn't mention it in the stand-up. It cost the team a day of rework later.

(Action) Since then I write down my points before every meeting, and I made a rule to share at least one update or question in each stand-up. I also joined a local developer meetup in Kathmandu and gave a five-minute lightning talk.

(Result) In my last two months of the internship, my mentor said my updates were among the clearest on the team. It still takes effort, but it no longer stops me from raising problems early."

Show how you prioritised, communicated early about risks, and delivered something useful, even if that meant reducing scope.

Avoid: stories that rely on skipping sleep for days as the main strategy, or a deadline you missed without learning anything.

Situation: During my internship, a client needed an event-registration form live in three days for a conference in Kathmandu, and the developer who started it had fallen sick.

Task: I had to finish the form, the admin list and the confirmation emails.

Action: On the first morning I listed every remaining task and agreed with my supervisor which were must-haves (registration, validation, confirmation email) and which could wait (CSV export, payment integration). I posted a short progress update every evening and flagged on day two that email delivery needed the client's SMTP details, so we got them in time.

Result: The must-have features went live a day early, more than 400 people registered, and we added the CSV export the following week. I learnt that agreeing on priorities and raising blockers early matters more than working longer hours.

Describe how you learn: official documentation, a small proof of concept, asking for help at the right moment. Then show the result of applying it.

Avoid: only listing courses or certificates without showing that you used the skill.

Situation: In my internship, the team decided to add push notifications to their Flutter app, and nobody had used Firebase Cloud Messaging before.

Task: My mentor asked me to research it and build a working prototype within one week.

Action: I read the official FlutterFire documentation first, then built a tiny separate app that only received a test notification. Once that worked, I wrote down the setup steps for Android and iOS and the problems I hit, such as notification permissions on Android 13. I asked a senior for a 20-minute review before integrating it into the main app.

Result: The prototype worked on day four, the feature shipped in the next release, and my setup notes became the team's internal guide. My approach now is always: documentation, a tiny prototype, notes, and then integration.

Middleware is a layer that every matching HTTP request passes through before it reaches the controller, and the response passes back through after. Each middleware can let the request continue ($next($request)), change it, or stop it early.

Common uses:

  • Authentication: auth / auth:sanctum reject guests.
  • Authorisation and roles: for example only admins can reach /admin.
  • Rate limiting: throttle:60,1.
  • CORS, CSRF protection, logging, setting the locale.
php
class EnsureUserIsAdmin
{
    public function handle(Request $request, Closure $next): Response
    {
        if (! $request->user()?->is_admin) {
            abort(403);
        }

        return $next($request);
    }
}

Route::middleware(['auth', EnsureUserIsAdmin::class])->group(function () {
    Route::get('/admin', AdminDashboardController::class);
});
  • SQL injection: the query builder and Eloquent use PDO parameter binding, so user input is never pasted into SQL. Stay safe with raw SQL by passing bindings: DB::select('select * from users where email = ?', [$email]). Never concatenate input into whereRaw.
  • XSS (cross-site scripting): Blade's {{ $value }} escapes output with htmlspecialchars. Only use {!! $value !!} for HTML you have sanitised.
  • CSRF (cross-site request forgery): web routes check a CSRF token on POST, PUT, PATCH and DELETE requests. Add @csrf inside Blade forms. Token-authenticated APIs (for example Sanctum tokens) are not exposed to CSRF in the same way.

Also mention: mass assignment protection with $fillable, validation with Form Requests, hashing passwords with Hash::make (bcrypt or argon2), and authorisation with policies.