Datasets:
Download README.md from adithegod/asked_before_cs_interview_questions: direct link, hf CLI and curl.
- Browser
- Download file 21.3 kB
-
https://huggingface.co/datasets/adithegod/asked_before_cs_interview_questions/resolve/main/README.md
- Command line
-
hf download hf://datasets/adithegod/asked_before_cs_interview_questions/README.md
-
curl -L -o README.md https://huggingface.co/datasets/adithegod/asked_before_cs_interview_questions/resolve/main/README.md
license: cc-by-4.0
language:
- en
task_categories:
- text-classification
task_ids:
- multi-class-classification
tags:
- interview-questions
- placements
- campus-recruitment
- computer-science
- aptitude
- technical-interviews
pretty_name: AskedBefore CS Interview Questions
size_categories:
- 10K<n<100K
configs:
- config_name: questions
default: true
data_files:
- split: train
path: askedbefore_cs_interview_questions.csv
- config_name: company_profiles
data_files:
- split: train
path: company_profiles.csv
- config_name: company_question_map
data_files:
- split: train
path: company_question_map.csv
AskedBefore CS Interview Questions
1,770 placement and interview questions across 15 subjects, mapped to the hiring processes of 19 companies, from mass recruiters like TCS and Infosys to Google, Amazon and other Big Tech firms.
Pick a company and you get the questions that match what it tests: aptitude and pseudocode for TCS, Wipro and Accenture; DSA, OOP and SQL for Infosys SP and Oracle; guesstimates and cases for ZS; DSA plus behavioural questions for Amazon and Meta.
Every question is written in original wording. None are copied from interview-prep websites, coding platforms or company question lists.
Important: the company mapping says a question is recommended for a company, because its subject and difficulty match that company's publicly documented hiring process. It does not claim the company asked that exact question.
At a glance
| Questions | 1,770 |
| Subjects | 15 (9 core CS and interview subjects + 6 placement-test subjects) |
| Companies profiled | 19 |
| Company-question links | 14,780 |
| Difficulty | easy 469, medium 1,007, hard 294 |
| Average length | 9.2 words / 50.3 characters |
| Unique words | 2,912 |
| Duplicates | 0 exact, 0 near-duplicates |
| License | CC BY 4.0 |
| Best subject classifier | Logistic Regression on TF-IDF, 0.762 macro F1 over 15 classes |
Files
| File | What it contains | Rows |
|---|---|---|
askedbefore_cs_interview_questions.csv |
The questions, with subject, difficulty and one column per company labelled core, frequent, occasional or blank |
1,770 |
company_profiles.csv |
One row per company: category, fresher roles, hiring rounds, core/frequent/occasional subjects, difficulty focus, data confidence, notes, source link | 19 |
company_question_map.csv |
Which questions are recommended for which company, with relevance (core, frequent, occasional) | 14,780 |
Companies covered
| Company | Category | Core subjects | Difficulty | Questions | Confidence |
|---|---|---|---|---|---|
| TCS | IT services (mass recruiter) | Quant, Reasoning, Verbal, Programming Fundamentals | easy, medium | 1,002 | medium |
| Infosys | IT services (mass recruiter) | DSA, OOP, DBMS & SQL | easy to hard | 1,140 | medium |
| Wipro | IT services (mass recruiter) | Quant, Reasoning, Verbal, Programming Fundamentals | easy, medium | 752 | medium |
| Accenture | IT services (mass recruiter) | Verbal, Reasoning, Programming Fundamentals, Cloud & Security | easy, medium | 680 | medium |
| Cognizant | IT services (mass recruiter) | Quant, Reasoning, Verbal, Programming Fundamentals, DBMS & SQL | easy, medium | 804 | medium |
| Capgemini | IT services (mass recruiter) | Reasoning, Programming Fundamentals, Behavioral | easy, medium | 1,002 | medium |
| HCLTech | IT services (mass recruiter) | Quant, Reasoning | easy, medium | 1,002 | medium |
| Deloitte | Consulting and technology services | Cloud & Security | easy, medium | 910 | medium |
| ZS Associates | Consulting and analytics | Guesstimates & Cases, Statistics, DBMS & SQL, Behavioral | easy to hard | 900 | medium |
| ION Group | Fintech and trading software | DSA, OOP, Operating Systems, Programming Fundamentals | easy to hard | 1,200 | medium |
| Oracle | Enterprise software | DSA, DBMS & SQL | easy to hard | 910 | medium |
| Adobe | Product company | DSA | medium, hard | 726 | medium |
| Blinkit | Product company (Indian startup) | DSA | medium, hard | 560 | low |
| Big Tech (FAANG/MAANG) | DSA | medium, hard | 336 | medium | |
| Microsoft | Big Tech (FAANG/MAANG) | DSA | medium, hard | 784 | medium |
| Amazon | Big Tech (FAANG/MAANG) | DSA, Behavioral (Leadership Principles) | medium, hard | 896 | high |
| Meta | Big Tech (FAANG/MAANG) | DSA, Behavioral | medium, hard | 336 | medium |
| Apple | Big Tech (FAANG/MAANG) | Behavioral | medium, hard | 504 | medium |
| Netflix | Big Tech (FAANG/MAANG) | System Design, Behavioral | medium, hard | 336 | medium |
Each company name links to the public hiring-process page its profile is based on. company_profiles.csv also lists each company's frequent and occasional subjects, typical fresher roles, round-by-round process and notes.
Confidence levels:
- High: based on the company's own official prep page.
- Medium: based on detailed public hiring-process guides.
- Low: very little public data. Blinkit's profile is a starting point to update with real reports.
How the mapping works
- Each company profile gives every subject a weight: 3 = core (tested in almost every round), 2 = frequent, 1 = occasional.
- Each profile also has a difficulty focus. Mass recruiters use easy and medium; product companies use medium and hard.
- A question is linked to a company when its subject has a weight and its difficulty is in the company's focus. The link's
relevancecolumn iscore,frequentoroccasional.
Example: TCS gets all easy and medium Quant, Reasoning, Verbal and Programming Fundamentals questions as core; DSA, OOP and DBMS questions as frequent; and OS and Networks questions as occasional.
Subjects and topics covered
| Subject | Questions | Topics covered |
|---|---|---|
| DSA | 150 | Arrays, strings, hashing, two pointers, sliding window, linked lists, stacks, queues, trees, BSTs, heaps, tries, graphs (BFS, DFS, shortest paths, topological sort, MST, SCCs), recursion, backtracking, dynamic programming, binary search, sorting, bit manipulation, segment trees, union find |
| Operating Systems | 150 | Processes and threads, scheduling, synchronization, deadlocks, classic problems, memory management, paging, virtual memory, page replacement, file systems, I/O, system calls, Linux internals, containers and VMs |
| DBMS & SQL | 150 | Keys, normalization, ER modelling, SQL (joins, aggregation, subqueries, CTEs, window functions), indexing, transactions, ACID, isolation, locking, recovery, replication, sharding, NoSQL, data warehousing |
| Computer Networks | 150 | OSI and TCP/IP, TCP vs UDP, flow and congestion control, IP addressing, subnetting, routing, DNS, DHCP, HTTP, TLS, switching, VLANs, proxies, CDNs, WebSockets, network attacks |
| OOP | 150 | Four pillars, constructors, inheritance, polymorphism, abstract classes vs interfaces, SOLID, design patterns, C++/Java/Python specifics, low-level design problems |
| System Design | 150 | Scaling, load balancing, caching, queues, microservices, consistency, CAP, consistent hashing, sharding, distributed patterns, reliability, deployments, classic high-level designs |
| Machine Learning | 150 | Supervised and unsupervised learning, trees and ensembles, metrics, bias-variance, regularization, optimization, neural networks, CNNs, RNNs, transformers, NLP, feature engineering, MLOps, LLMs |
| Statistics & Analytics | 150 | Probability, distributions, hypothesis testing, confidence intervals, A/B testing, product metrics, funnels, cohorts, regression, time series, causal inference |
| Behavioral / HR | 150 | Introductions, motivation, strengths and weaknesses, STAR situations (conflict, failure, leadership, deadlines, feedback, ownership), teamwork, ethics |
| Programming Fundamentals | 80 | C, Java and Python basics, pointers and memory, pseudocode tracing, operators and bitwise logic, exceptions, strings and collections, compile vs runtime errors |
| Quantitative Aptitude | 80 | Percentages, profit and loss, interest, ratios, averages, mixtures, time and work, pipes, speed and distance, trains and boats, permutations, probability, number system, clocks and calendars, mensuration |
| Logical Reasoning | 80 | Series, coding-decoding, blood relations, directions, seating, syllogisms, statements and assumptions, data sufficiency, cubes, Venn diagrams, clocks and calendars, classic puzzles |
| Verbal Ability | 60 | Synonyms, antonyms, idioms, error spotting, articles and prepositions, voice and speech, para jumbles, reading comprehension strategy, critical reasoning, essay writing |
| Guesstimates & Case Studies | 60 | Market sizing, guesstimates, profitability, market entry, pricing, operations, pharma and healthcare cases, fintech and trading cases, structuring and presenting |
| Cloud & Security | 60 | Cloud models (IaaS, PaaS, SaaS), virtualization, IAM, Docker, Kubernetes, DevOps, CI/CD, common attacks (SQL injection, XSS, CSRF, phishing, ransomware), encryption, zero trust, incident response |
Statistics
Subject × difficulty
| Subject | Easy | Medium | Hard | Total |
|---|---|---|---|---|
| DSA | 38 | 86 | 26 | 150 |
| Operating Systems | 38 | 88 | 24 | 150 |
| DBMS & SQL | 38 | 86 | 26 | 150 |
| Computer Networks | 38 | 86 | 26 | 150 |
| OOP | 38 | 86 | 26 | 150 |
| System Design | 38 | 86 | 26 | 150 |
| Machine Learning | 38 | 86 | 26 | 150 |
| Statistics & Analytics | 38 | 86 | 26 | 150 |
| Behavioral / HR | 38 | 86 | 26 | 150 |
| Programming Fundamentals | 24 | 44 | 12 | 80 |
| Quantitative Aptitude | 24 | 44 | 12 | 80 |
| Logical Reasoning | 26 | 42 | 12 | 80 |
| Verbal Ability | 18 | 34 | 8 | 60 |
| Guesstimates & Case Studies | 17 | 33 | 10 | 60 |
| Cloud & Security | 18 | 34 | 8 | 60 |
| Total | 469 | 1,007 | 294 | 1,770 |
Question length
| Words | Characters | |
|---|---|---|
| Mean | 9.2 | 50.3 |
| Median | 8 | 48 |
| Shortest | 3 | 12 |
| Longest | 43 | 177 |
Aptitude and reasoning questions are the longest (about 17 to 18 words on average), because they include numbers and conditions. Concept questions in ML, Cloud & Security, OOP and Networks are the shortest (about 7 words).
Question style
| Starts with | Count | Share |
|---|---|---|
| What ... | 944 | 53.3% |
| Other (coding tasks, puzzles, fill-in-the-blanks, yes/no) | 373 | 21.1% |
| How ... | 208 | 11.8% |
| Tell me / Describe ... | 87 | 4.9% |
| Design ... | 71 | 4.0% |
| Explain ... | 30 | 1.7% |
| Write ... | 24 | 1.4% |
| Estimate ... | 13 | 0.7% |
| Why ... | 12 | 0.7% |
| Compare ... | 8 | 0.5% |
1,288 questions (72.8%) end with a question mark.
Company-question links by relevance
| Company | Core | Frequent | Occasional | Total |
|---|---|---|---|---|
| Accenture | 240 | 316 | 124 | 680 |
| Adobe | 112 | 504 | 110 | 726 |
| Amazon | 224 | 224 | 448 | 896 |
| Apple | 112 | 280 | 112 | 504 |
| Blinkit | 112 | 0 | 448 | 560 |
| Capgemini | 260 | 368 | 374 | 1,002 |
| Cognizant | 380 | 176 | 248 | 804 |
| Deloitte | 52 | 808 | 50 | 910 |
| 112 | 112 | 112 | 336 | |
| HCLTech | 136 | 866 | 0 | 1,002 |
| Infosys | 450 | 380 | 310 | 1,140 |
| ION Group | 530 | 670 | 0 | 1,200 |
| Meta | 224 | 0 | 112 | 336 |
| Microsoft | 112 | 560 | 112 | 784 |
| Netflix | 224 | 112 | 0 | 336 |
| Oracle | 300 | 530 | 80 | 910 |
| TCS | 256 | 496 | 250 | 1,002 |
| Wipro | 256 | 248 | 248 | 752 |
| ZS Associates | 510 | 160 | 230 | 900 |
Example questions
| Subject | Difficulty | Question |
|---|---|---|
| DSA | medium | Implement an LRU cache with O(1) get and put. |
| DSA | hard | Find the median of a data stream. |
| Operating Systems | medium | Explain the four necessary conditions for a deadlock. |
| DBMS & SQL | medium | Write a SQL query to find the nth highest salary. |
| Computer Networks | medium | What happens when you type a website address into a browser and press enter? |
| OOP | hard | Design the classes for a chess game. |
| System Design | hard | Design a distributed message queue like Kafka. |
| Machine Learning | hard | What is LoRA and why is it used to fine tune large models? |
| Statistics & Analytics | hard | What is CUPED and how does it reduce variance in experiments? |
| Behavioral / HR | medium | Describe a conflict with a teammate and how you resolved it. |
| Programming Fundamentals | medium | What is the difference between call by value and call by reference? |
| Quantitative Aptitude | medium | A can finish a work in 12 days and B in 18 days. In how many days can they finish it together? |
| Logical Reasoning | hard | Four people must cross a bridge at night with one torch, taking 1, 2, 5 and 10 minutes. What is the minimum time for all to cross? |
| Verbal Ability | easy | What does the idiom break the ice mean? |
| Guesstimates & Case Studies | medium | A quick commerce company wants to open dark stores in a new city. How would you decide where to open them? |
| Cloud & Security | medium | What is SQL injection and how do you prevent it? |
Dataset structure
askedbefore_cs_interview_questions.csv
| Column | Description |
|---|---|
id |
Unique id, ab-0000 to ab-1769 |
question |
The question, usually one sentence |
subject |
One of the 15 subjects |
difficulty |
easy, medium or hard |
source_type |
Always original: written for this dataset |
version |
v1, v2 or v3 (see Versions) |
TCS, Infosys, Wipro, Accenture, Cognizant, Capgemini, HCLTech, Deloitte, ZS Associates, ION Group, Oracle, Adobe, Blinkit, Google, Microsoft, Amazon, Meta, Apple, Netflix |
One column per company: core, frequent or occasional if the question is recommended for that company, blank if not |
recommended_for |
All companies the question is recommended for, separated by ; |
Example rows:
| question | Microsoft | TCS | ZS Associates | |
|---|---|---|---|---|
| Perform a topological sort of a directed acyclic graph. | core | core | frequent | |
| Find the LCM of 12, 18 and 30. | core | frequent | ||
| A pharma client's new drug had good trial results but weak sales after launch. Diagnose the problem and recommend next steps. | core |
The company columns contain the same information as company_question_map.csv, in a wider format that is easier to filter. 16 hard questions (in subjects only easy-and-medium companies test) are not recommended for any company.
company_profiles.csv: company, category, fresher_roles, hiring_rounds, core_subjects, frequent_subjects, occasional_subjects, difficulty_focus, data_confidence, notes, sources.
company_question_map.csv: company, question_id (matches id), subject, difficulty, relevance (core, frequent, occasional), weight (3, 2, 1).
How to use
from datasets import load_dataset
repo = "YOUR_USERNAME/askedbefore-cs-interview-questions"
questions = load_dataset(repo, "questions", split="train").to_pandas().fillna("") # blank company cells -> ""
profiles = load_dataset(repo, "company_profiles", split="train").to_pandas()
links = load_dataset(repo, "company_question_map", split="train").to_pandas()
# Core practice set for TCS, straight from the company column
tcs_core = questions[questions["TCS"] == "core"]
print(tcs_core.subject.value_counts())
# Everything recommended for Google, most important first
google = questions[questions["Google"] != ""].sort_values("Google")
# Same thing using the long-format map
tcs = links[(links.company == "TCS") & (links.relevance == "core")]
Baseline results
Subject classification (15 classes) from the question text. Features: TF-IDF word 1-2 grams plus character 3-5 grams. Evaluation: stratified 5-fold cross-validation over all 1,770 questions.
| Model | Macro F1 | Accuracy |
|---|---|---|
| Logistic Regression | 0.762 ± 0.031 | 0.764 |
| Random Forest (baseline) | 0.631 ± 0.026 | 0.634 |
| XGBoost | 0.603 ± 0.025 | 0.627 |
Per-subject F1 (Logistic Regression, cross-validated):
| Subject | Precision | Recall | F1 |
|---|---|---|---|
| Behavioral / HR | 0.935 | 0.953 | 0.944 |
| DSA | 0.866 | 0.907 | 0.886 |
| Guesstimates & Case Studies | 0.844 | 0.900 | 0.871 |
| Verbal Ability | 0.870 | 0.783 | 0.825 |
| OOP | 0.833 | 0.767 | 0.799 |
| Quantitative Aptitude | 0.808 | 0.787 | 0.797 |
| DBMS & SQL | 0.810 | 0.740 | 0.774 |
| Operating Systems | 0.745 | 0.720 | 0.732 |
| Machine Learning | 0.732 | 0.727 | 0.729 |
| Computer Networks | 0.654 | 0.807 | 0.722 |
| System Design | 0.771 | 0.673 | 0.719 |
| Logical Reasoning | 0.761 | 0.675 | 0.715 |
| Cloud & Security | 0.795 | 0.583 | 0.673 |
| Statistics & Analytics | 0.625 | 0.700 | 0.660 |
| Programming Fundamentals | 0.531 | 0.637 | 0.580 |
Programming Fundamentals is the hardest subject to classify because its questions share vocabulary with DSA, OOP and Operating Systems (pointers, memory, recursion). Cloud & Security overlaps with Networks and System Design. The score is lower than the 0.802 of the 9-subject version because there are more classes and more overlap between them.
How it was made
- Questions: for each subject, listed the concepts commonly tested in placement tests and technical interviews, and wrote one original question per concept, varying the phrasing. Questions were drafted with AI assistance and reviewed and labelled by the maintainer.
- Deduplication: removed exact and near-duplicate questions automatically after normalising case, punctuation and filler words.
- Company profiles: for each company, read publicly available descriptions of its fresher hiring process (test sections, interview rounds, topics, difficulty) and turned them into subject weights and a difficulty focus. The source page for each company is listed in
company_profiles.csv. - Mapping: linked questions to companies automatically from the profiles (see How the mapping works).
Versions
| Version | Change | Total questions |
|---|---|---|
| v1 | 9 subjects, 80 questions each | 720 |
| v2 | 70 more questions per subject | 1,350 |
| v3 | 6 new subjects (Programming Fundamentals, Quantitative Aptitude, Logical Reasoning, Verbal Ability, Guesstimates & Case Studies, Cloud & Security), plus company profiles and company-question mapping | 1,770 |
Ids from earlier versions never change.
Limitations
- Recommended, not reported. Company links come from public descriptions of hiring processes, not from records of questions a company actually asked. Hiring processes also change from year to year and between roles.
- Uneven company data. Some profiles rest on a single public source, and Blinkit's is marked low confidence.
- No answers yet. Aptitude and reasoning questions are solvable, but the dataset does not include answers or solutions.
- Short, clean text. Real interview conversations are messier, so classifiers trained here may score lower on them.
- One label per question. Some questions sit between subjects but have exactly one label.
- Difficulty is subjective. It reflects a typical Indian campus-placement and new-graduate interview.
- English only.
License
CC BY 4.0: free to share and adapt, including commercially, with credit. Company names are used only to describe their public hiring processes; this dataset is not affiliated with or endorsed by any of these companies.
Citation
@misc{askedbefore_cs_interview_questions,
title = {AskedBefore CS Interview Questions},
author = {Aditya},
year = {2026},
url = {https://huggingface.co/datasets/YOUR_USERNAME/askedbefore-cs-interview-questions}
}