InternDoor

Micron Technology interview prep

7 practice questions on the topics candidates reported from Micron Technology interviews, with answers. The questions are ours; each one links to the interview report that names its topic.

Practise them as a timed round8 roles open at Micron Technology

DSA 2

  1. DSAEasy

    Which data structure does a running program use to keep track of recursive calls that have not returned yet?

    1. A queue
    2. A heap
    3. A hash table
    4. A stack, the call stack
    Show the answer

    D. A stack, the call stack

    Each call pushes a frame with its arguments, locals and return address, and returning pops it. Recursion that never reaches its base case overflows this stack.

    This topic is named in a candidate’s interview report: On-campus interview, 2021, on GeeksforGeeks.

  2. DSAMedium

    To check whether any two numbers in an unsorted array of n numbers add up to k, you scan once, checking whether k - x is in a hash set of numbers already seen and then adding x. What does this cost?

    1. O(n) time and O(n) extra space
    2. O(n log n) time and O(1) extra space
    3. O(n^2) time and O(1) extra space
    4. O(log n) time
    Show the answer

    A. O(n) time and O(n) extra space

    Each hash lookup and insert is O(1) on average. Sorting and moving two pointers inwards is the O(n log n) alternative that needs no hash set, and checking every pair is the O(n^2) brute force.

    This topic is named in a candidate’s interview report: Full-time on-campus interview, 2020, on GeeksforGeeks.

Python 1

  1. PythonEasy

    Which of these built-in types is immutable?

    1. list
    2. dict
    3. tuple
    4. set
    Show the answer

    C. tuple

    A tuple cannot be changed after it is created, which is also why it can be a dictionary key. Lists, dicts and sets can all be modified in place.

    This topic is named in a candidate’s interview report: On-campus interview, 2021, on GeeksforGeeks.

OOP 1

  1. OOPMedium

    In Java 8 or later, which statement about abstract classes and interfaces is true?

    1. An interface can have constructors
    2. A class can extend two abstract classes
    3. A class extends at most one abstract class but can implement many interfaces; an abstract class can have constructors and instance fields, an interface cannot
    4. An abstract class cannot have any methods with a body
    Show the answer

    C. A class extends at most one abstract class but can implement many interfaces; an abstract class can have constructors and instance fields, an interface cannot

    Use an abstract class to share state and code among closely related classes, and an interface to describe a capability many unrelated classes can have. Interfaces can hold constants and default methods, but not instance fields.

    This topic is named in a candidate’s interview report: On-campus interview, 2021, on GeeksforGeeks.

DBMS and SQL 2

  1. DBMS and SQLMedium

    How does a UNIQUE constraint differ from a PRIMARY KEY?

    1. A table can have many primary keys but only one UNIQUE constraint
    2. A table has one primary key, which can never be NULL; it can have several UNIQUE constraints, whose columns may hold NULL in most databases
    3. UNIQUE columns cannot be indexed
    4. A primary key allows duplicate values
    Show the answer

    B. A table has one primary key, which can never be NULL; it can have several UNIQUE constraints, whose columns may hold NULL in most databases

    Both forbid duplicates. The primary key identifies each row and is NOT NULL by definition; UNIQUE columns are alternate keys such as an email address.

    This topic is named in a candidate’s interview report: On-campus interview, 2021, on GeeksforGeeks.

  2. DBMS and SQLMedium

    department(dept_id, dept_name) and employee(emp_id, dept_id). Which query lists the departments that have more than 100 employees?

    1. SELECT d.dept_name FROM department d JOIN employee e ON e.dept_id = d.dept_id WHERE COUNT(*) > 100 GROUP BY d.dept_name;
    2. SELECT d.dept_name FROM department d JOIN employee e ON e.dept_id = d.dept_id GROUP BY d.dept_name HAVING COUNT(*) > 100;
    3. SELECT d.dept_name FROM department d JOIN employee e ON e.dept_id = d.dept_id ORDER BY COUNT(*) > 100;
    4. SELECT dept_name FROM department WHERE dept_id IN (SELECT dept_id FROM employee) > 100;
    Show the answer

    B. SELECT d.dept_name FROM department d JOIN employee e ON e.dept_id = d.dept_id GROUP BY d.dept_name HAVING COUNT(*) > 100;

    COUNT(*) only exists once rows are grouped, so the condition on it goes in HAVING, which filters groups. WHERE filters single rows before grouping and cannot use an aggregate.

    This topic is named in a candidate’s interview report: Full-time on-campus interview, 2020, on GeeksforGeeks.

Machine learning 1

  1. Machine learningEasy

    Which of these is a supervised learning task?

    1. Predicting whether an email is spam, from emails already labelled spam or not
    2. Grouping customers into segments with no labels
    3. Reducing 100 features to 2 for a chart
    4. Finding unusual transactions with no examples of fraud
    Show the answer

    A. Predicting whether an email is spam, from emails already labelled spam or not

    Supervised learning trains on inputs paired with the right answers, here the spam labels. The other three find structure in unlabelled data, which is unsupervised learning.

    This topic is named in a candidate’s interview report: On-campus interview, 2020 batch, on GeeksforGeeks.

Prep for other employers

All employers
See who is hiring after Micron Technology

Engineering internships and entry-level jobs in India, newest first.