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 Native5
Level
AnyEasyMediumHard

3 questions

  • Why they ask this: Indexes are the first tool for slow queries; this checks real-world database thinking.

    Answer

    An index is a separate data structure (usually a B-tree) that lets the database find rows without scanning the whole table, much like the index at the back of a book.

    Benefits: much faster WHERE, JOIN, ORDER BY and lookups on the indexed columns.

    Trade-offs:

    • Writes (INSERT, UPDATE, DELETE) get slower because every index must be updated too.
    • Indexes use extra disk space and memory.
    • Indexes on columns with few distinct values (such as a boolean) rarely help on their own.

    Composite indexes follow the leftmost-prefix rule: an index on (status, created_at) helps WHERE status = ? and WHERE status = ? ORDER BY created_at, but not WHERE created_at > ? alone.

    sql
    CREATE INDEX jobs_status_created_at_index ON jobs (status, created_at);
    EXPLAIN SELECT * FROM jobs WHERE status =
    Open full page
  • Why they ask this: A favourite academic and interview topic in Nepal; it also shows you can design clean schemas.

    Answer

    Normalisation organises tables to remove duplicate data and the update problems it causes.

    • 1NF: every column holds a single (atomic) value and there are no repeating groups. Not skills = "PHP, SQL"; use a separate row per skill.
    • 2NF: 1NF, and every non-key column depends on the whole primary key. This matters for composite keys: in (student_id, course_id) → student_name, the name depends only on student_id, so move it to a students table.
    • 3NF: 2NF, and non-key columns depend only on the key, not on other non-key columns (no transitive dependency). If employees stores department_id and department_name, move the name to a departments table.

    Sometimes you denormalise on purpose for read performance, for example by storing a jobs_count on companies. Do it knowingly and keep the copy in sync.

    Open full page
  • Why they ask this: Payments and orders must never be half-saved; this checks you can protect data consistency.

    Answer

    Open full page
'open'
ORDER BY
created_at
DESC
;

Use EXPLAIN to check whether a query actually uses an index.

A transaction groups several statements so that they all succeed or all fail together.

ACID:

  • Atomicity: all or nothing. On error, everything is rolled back.
  • Consistency: the data moves from one valid state to another and constraints still hold.
  • Isolation: concurrent transactions do not see each other's half-finished work (the exact level depends on the isolation level).
  • Durability: once committed, the data survives a crash.
php
DB::transaction(function () use ($order, $payment) {
    $payment->update(['status' => 'paid']);
    $order->update(['status' => 'confirmed']);
    $order->product->decrement('stock', $order->quantity);
}); // any exception rolls back all three

Classic example: a bank transfer debits one account and credits another. Both must happen, or neither.