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 Basics9Behavioural (STAR)3
Level
AnyEasyMediumHard

50 questions

12345
  • Why they ask this: The standard stack problem; it shows you can pick the right data structure for matching pairs.

    Given a string s containing only the characters (, ), {, }, [ and ], return true if: every opening bracket is closed by the same type of bracket, and brackets…

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

    How to answer

    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.

    Sample answer · STAR

    Open full page
  • Why they ask this: Asked at the end of almost every interview. Good questions show genuine interest and help you judge the company.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: Hooks are how modern React is written; breaking the rules causes hard-to-find bugs.

    Answer

    Open full page
  • Why they ask this: Many companies are in Kathmandu Valley, while others are remote or hybrid; HR needs to know whether the arrangement works for you.

    How to answer

    Sample answer · STAR

    Open full page
  • Why they ask this: Most React bugs (infinite loops, stale data, memory leaks) come from misusing useEffect.

    Answer

    Open full page
  • Why they ask this: Wrong keys cause subtle UI bugs, so this checks practical experience.

    Answer

    Open full page
  • Why they ask this: The most basic React concept; a weak answer is a red flag for any React role.

    Answer

    Open full page
  • Why they ask this: Every developer calls or builds APIs; correct method use is a basic expectation.

    Answer

    Open full page
  • Why they ask this: Correct status codes make APIs predictable for frontend and mobile developers.

    Answer

    Open full page
  • Why they ask this: Every team uses Git; this checks you can collaborate without rewriting shared history.

    Answer

    Open full page
  • Why they ask this: A basic Git question that shows whether you understand remote-tracking branches.

    Answer

    Open full page

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.

Always have two or three questions ready. Saying "No, everything is clear" is a missed opportunity. Good questions are about the work, the team and growth:

  • "What would a typical first month look like for this role?"
  • "How do junior developers get feedback: code reviews, mentoring, one-to-ones?"
  • "What does the tech stack look like, and what are you planning to change?"
  • "How do you measure success for this position after six months?"
  • "What are the next steps in the hiring process, and when can I expect to hear back?"

Ask about salary and leave after an offer or when HR raises it, unless they ask you first.

"Yes, thank you. I have two questions.

First, what would success look like for someone in this role after the first three months?

Second, how does the team review code? I'd like to understand how juniors get feedback so I can improve quickly.

And finally, what are the next steps in the process?"

Hooks are functions that let function components use React features: useState (state), useEffect (side effects), useContext, useRef, useMemo, useCallback, and your own custom hooks (useSomething).

Rules of hooks:

  1. Call hooks only at the top level of a component or custom hook, never inside conditions, loops or nested functions. React identifies each hook by its call order.
  2. Call hooks only from React function components or custom hooks, not from regular functions.
jsx
function Profile({ userId }) {
  const [user, setUser] = useState(null);       // top level: OK
  // if (userId) { useEffect(...) }             // wrong: conditional hook
  useEffect(() => {
    if (!userId) return;                         // put the condition inside
    fetch(`/api/users/${userId}`).then((r) => r.json()).then(setUser);
  }, [userId]);
  return <p>{user?.name}</p>;
}

The eslint-plugin-react-hooks lint rules catch most mistakes.

Be honest and specific about what you can do: relocating to Kathmandu, Lalitpur or Pokhara, working on-site or hybrid, or remotely with a reliable internet connection and power backup. If you have constraints, explain them briefly and offer a solution.

For remote roles, show that you can work independently: a quiet workspace, a backup internet connection (or a mobile data plan), and clear communication habits.

Avoid: saying yes to something you cannot actually do. It will cause problems after you join.

"Yes. I'm currently in Chitwan, and I'm ready to move to Kathmandu within two weeks of an offer. I have relatives in Lalitpur where I can stay at first.

I'm also comfortable with a hybrid setup. During my remote internship last year I worked with a fibre connection plus a mobile data backup, posted daily written updates on Slack, and joined every stand-up on time, so I know how to stay visible and productive when working from home."

useEffect(effect, deps) runs effect after render:

  • No array: runs after every render.
  • []: runs once after the first render (mount).
  • [a, b]: runs after the first render and again whenever a or b changes (compared with Object.is).

The function you return is the cleanup. It runs before the effect runs again and when the component unmounts. Use it to remove listeners, clear timers and cancel requests.

jsx
useEffect(() => {
  const controller = new AbortController();
  fetch(`/api/jobs?q=${query}`, { signal: controller.signal })
    .then((r) => r.json())
    .then(setJobs)
    .catch(() => {});
  return () => controller.abort(); // cancel the old request when query changes
}, [query]);

Include every value from the component that the effect uses in the array. Missing dependencies cause stale values.

A key gives each list item a stable identity, so React can tell which items were added, removed or reordered between renders and keep the right state and DOM node for each one.

jsx
{todos.map((todo) => (
  <TodoItem key={todo.id} todo={todo} />
))}
  • Use a stable, unique id from your data.
  • Avoid the array index as a key when items can be inserted, deleted or reordered. React would then match state (such as an input's text) to the wrong item.
  • Keys only need to be unique among siblings.
PropsState
Owned bythe parentthe component itself
Changeable by the component?No, read-onlyYes, through the setter (setX)
Purposeconfigure a component and pass data downdata that changes over time
jsx
function Counter({ step }) {          // step is a prop
  const [count, setCount] = useState(0); // count is state
  return <button onClick={() => setCount((c) => c + step)}>{count}</button>;
}

Changing either one re-renders the component. When two siblings need the same data, lift the state up to their common parent and pass it down as props.

MethodUseSafeIdempotent
GETread a resourceyesyes
POSTcreate a resource or trigger an actionnono
PUTreplace a resource completelynoyes
PATCHupdate part of a resourcenonot guaranteed
DELETEremove a resourcenoyes
  • Safe means the request does not change server data.
  • Idempotent means sending the same request several times leaves the server in the same state as sending it once. Two identical POST /orders calls can create two orders, while PUT /users/5 with the same body twice gives the same result.

This matters for retries: clients and proxies can safely retry idempotent requests after a network error. For payments, use an idempotency key to make POST safe to retry.

  • 2xx success: 200 OK, 201 Created (after a POST that creates something), 204 No Content (success with no body).
  • 3xx redirect: 301 Moved Permanently, 302 Found, 304 Not Modified (use the cached copy).
  • 4xx client error:
    • 400 Bad Request: malformed request.
    • 401 Unauthorized: not authenticated (no token or a bad token).
    • 403 Forbidden: authenticated but not allowed.
    • 404 Not Found.
    • 409 Conflict: for example a duplicate email.
    • 422 Unprocessable Content: validation errors (Laravel's default).
    • 429 Too Many Requests: rate limited.
  • 5xx server error: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.

A frequent interview trap is the difference between 401 and 403.

Both bring changes from one branch into another:

  • git merge main creates a merge commit that joins the two histories. Nothing is rewritten, so it is safe on shared branches, but the history shows every merge.
  • git rebase main replays your branch's commits on top of main, creating new commits with new hashes. The result is a clean, linear history.
bash
git switch feature/login
git fetch origin
git rebase origin/main      # update your feature branch
# fix conflicts, then: git add <file> && git rebase --continue
git push --force-with-lease # needed because history changed

Golden rule: never rebase commits that other people have already pulled (such as main). Rebase your own feature branch; merge into shared branches, usually through a pull request.

  • git fetch downloads new commits and branches from the remote and updates the remote-tracking branches (origin/main). It does not change your working files or your current branch.
  • git pull is git fetch followed by a merge (or a rebase, with git pull --rebase) into your current branch.
bash
git fetch origin
git log --oneline main..origin/main   # see what is new before merging
git pull --rebase origin main         # fetch and replay your commits on top

Fetching first is safer when you want to review incoming changes before integrating them.