Skip to content

Instantly share code, notes, and snippets.

@decagondev
Last active April 23, 2025 22:11
Show Gist options
  • Save decagondev/13d7ca2dbb951b87593457e96eadb89d to your computer and use it in GitHub Desktop.
Save decagondev/13d7ca2dbb951b87593457e96eadb89d to your computer and use it in GitHub Desktop.

A List of problems for the technical interview phase along with a capstone project problem

PROBLEM 1: Longest Substring Without Repeating Characters

Problem Statement

Given a string s, find the length of the longest substring without repeating characters.

Concepts Covered

  • Sliding Window
  • Hashing
  • Two Pointers

Examples

Input: "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.

Input: "bbbbb"
Output: 1
Explanation: The answer is "b", with the length of 1.

Input: "pwwkew"
Output: 3
Explanation: The answer is "wke", with the length of 3.

Starter Code

Python

def length_of_longest_substring(s: str) -> int:
    # Implement your solution here
    pass

JavaSctipt

fuction lengthOfLongestSbstring(s) {
  // Implement your solution here
  return;

Java

public class Solution1 {
    public int lengthOfLongestSubstring(String s) {
        // Implement your solution here
        return 0;
    }
}

PROBLEM 2: Two Sum

Problem Statement

Given an array of integers nums and an integer target, return the indices of the two numbers such that they add up to target.

Concepts Covered

  • Hash Map
  • Brute Force Search

Examples

Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]

Input: nums = [3, 2, 4], target = 6
Output: [1, 2]

Input: nums = [3, 3], target = 6
Output: [0, 1]

Starter Code

Python

def two_sum(nums: list[int], target: int) -> list[int]:
    # Implement your solution here
    pass

JavaScript

function twoSum(nums, target) {
  // Implement your solution here
}

Java

public class Solution {
    public int[] twoSum(int[] s, int target) {
        // Implement your solution here
        return [0,0,0];
    }
}

CAPSTONEJS1: QuickPoll - A Real-Time Poll Voting Web App

Problem / Spec

Avatar: Jenna, a junior frontend developer, wants to build a real-time poll app she can demo to employers. She knows HTML, CSS, JS, and is learning React. She needs a simple, beautiful, and interactive app to showcase her skills.

Application: Build a real-time poll voting web app called QuickPoll.

Objective: Allow users to vote on a question and instantly see results.

Constraints:

  • Only one question per poll.
  • Options are defined upfront.
  • Voting results update live (simulated).
  • Should be built in 1 hour.

Stack Choices (Pick one):

  1. Vanilla HTML/CSS/JS with minimal state
  2. Vite + React with Hooks

Requirements

  • A poll question (e.g., "Which is better: cats or dogs?")
  • Two to four options
  • A way to submit a vote (once only per session)
  • Show results as a percentage bar after voting
  • Clean, responsive UI (mobile-friendly)

Example

Question: What’s your favorite frontend framework?
Options: React, Vue, Angular, Svelte
After voting: Bars animate to show vote share

CAPSTONEPY1: QuickPoll - A Real-Time Poll Voting Web App (Python Flask Version)

Problem / Specification

Avatar: Jenna, a junior frontend developer, wants to build a real-time poll app she can demo to employers. She knows HTML, CSS, JS, and is learning React. She needs a simple, beautiful, and interactive app to showcase her skills — but this time with a backend in Python using Flask.

Application Goal: Build a real-time poll voting web app called QuickPoll.

Objective

Allow users to vote on a poll question and instantly see results.

Constraints

  • One question per poll.
  • Options are defined upfront.
  • Voting results update live (simulated real-time).
  • Should be built in 1 hour.
  • Stack must use Python (Flask) for the backend and optionally React or plain JS for the frontend.

Requirements

  • ✅ A single poll question (e.g., “Which is better: cats or dogs?”)
  • ✅ Two to four voting options
  • ✅ Submit vote once per session (via browser cookie or IP check)
  • ✅ Show results as percentage bars after voting
  • ✅ Clean and mobile-friendly UI
  • ✅ Simulate live updates using polling or WebSocket (simple version uses JavaScript polling)

CAPSTONEJAVA1: QuickPoll - A Real-Time Poll Voting Web App (Java Spring Boot Version)

Problem / Specification

Avatar: Jenna, a junior frontend developer, wants to build a real-time poll app she can demo to employers. She knows HTML, CSS, JS, and is learning React. She needs a simple, beautiful, and interactive app to showcase her skills — this time with a Java backend using Spring Boot.

Application Goal: Build a real-time poll voting web app called QuickPoll.

Objective

Allow users to vote on a poll question and instantly see results.

Constraints

  • One question per poll.
  • Options are defined upfront.
  • Voting results update live (simulated real-time).
  • Should be built in 1 hour.
  • Stack must use Java (Spring Boot) for the backend and optionally React or plain JS for the frontend.

Requirements

  • ✅ A single poll question (e.g., “Which is better: cats or dogs?”)
  • ✅ Two to four voting options
  • ✅ Submit vote once per session (via browser cookie or IP check)
  • ✅ Show results as percentage bars after voting
  • ✅ Clean and mobile-friendly UI
  • ✅ Simulate live updates using polling or WebSocket (simple version uses JavaScript polling)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment