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

2 questions

  • Why they ask this: Separates candidates who understand rendering performance from those who memoise everything by habit.

    Answer

    • useMemo(fn, deps) caches a computed value until deps change.
    • useCallback(fn, deps) caches a function reference until deps change. It is the same as useMemo(() => fn, deps).

    Use them when:

    1. A calculation is genuinely expensive, such as filtering or sorting thousands of rows.
    2. You pass an object or function to a child wrapped in React.memo, and a new reference every render would defeat it.
    3. The value is a dependency of another hook (useEffect) and a new reference would re-run it every render.
    jsx
    const visibleJobs = useMemo(
      () => jobs.filter((j) => j.title.toLowerCase().includes(query.toLowerCase())),
      [jobs, query],
    );
    const handleSelect = useCallback((id) => setSelected(id), []);

    Skip them for cheap calculations and for handlers passed to plain DOM elements. Memoisation itself costs memory and comparisons, so measure with the React DevTools Profiler before you optimise. (React Compiler can add this memoisation automatically in projects that use it.)

    Open full page
  • Why they ask this: Shows you understand the core of the framework and can write testable, loosely coupled code.

    Answer

    Dependency injection (DI) means a class receives the objects it needs (its dependencies) from outside, usually through the constructor, instead of creating them itself. This makes code easier to test and swap.

    The service container is Laravel's tool for building objects and their dependencies. It uses reflection on type hints to auto-resolve concrete classes, so this works with no configuration:

    php
    class InvoiceController
    {
        public function __construct(private InvoiceService $invoices) {}
    }

    For interfaces, you tell the container which implementation to use, usually in a service provider:

    php
    $this->app->bind(PaymentGateway::class, KhaltiGateway::class);
    $this->app->singleton(ExchangeRates::class, fn () => new ExchangeRates(config('services.nrb.url')));

    Benefits:

    • In tests you can replace an implementation with a fake: $this->app->instance(PaymentGateway::class, new FakeGateway).
    • Switching from eSewa to Khalti only changes one binding, not every class that uses the gateway.
    Open full page