Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My favorite interview questions

free-form answer

computer science (algorithms, architecture, data structures, and operating system theory)

  1. under what circumstances would you use an array over an linked-list (or other data structure)?
  2. what is the average search time for a binary search tree?
  • what can impact a binary search tree's performance metrics?
  • how can these algorithmic vulnerabilities be mitigated?
  1. what are at least two approaches to hash table insertion collisions?
  • what are the algorithmic costs to each?
  1. what is the difference between a process and a thread?
  2. what is a race condition?
  3. what types of semaphores exist and what are their key differences?
  4. what conditions lead to a deadlock?
  • how can deadlocks be avoided?
  1. what forms of inter-process communication are you most familiar?
  2. how can pipeline depth impact branch prediction strategies?
  3. what is the purpose of a re-order buffer?
  4. what problems are more readily addressed by object-oriented programming languages?
  5. what is one purpose of inheritance in objects?
  6. if you define a method as pure virtual in the base class, what does this mean for developers?
  7. what services does an operating system need to provide?
  8. what is a network socket?
  9. what is a file system?
  10. what is the purpose of a hardware abstraction layer?
  11. what is the problem addressed by double-buffering I/O? [perhaps better to provide a problem and ask them to solve it and see if they arrive at double-buffering]
  12. what are system interrupts?
  13. what are system calls?
  14. what is the primary difference between RISC and CISC?
  15. [could really use a question about distributed operating systems, maybe the gossip protocol...]
  16. what is the difference between synchronous and asynchronous, [blocking and non-blocking]?
  • what are the considerations you must take when programming with either?
  1. what are the characteristics of something that is embarrassingly parallel?

networking

  1. why is it TCP/IP? versus simply TCP?
  2. what is the difference between TCP and UDP?
  3. what service is IP providing?
  4. what service is ARP providing?
  5. why are the networking protocols layered?
  6. how does dns work?
  7. what limitations do protocols face? (for example sequence numbers in TCP, or IP address-space)
  8. what improvements have been added to TCP and why? (only if porported expert in TCP) (i'm expecting timestamps, and some other stuff)
  9. what is the nagle algorithm in the context of network streams?
  • when is it good to enable or disable this?

software engineering

  1. what is the value of version control?
  2. describe at least two models of software development and compare them with examples.
  3. what do you feel are important to teach someone new to software engineering?
  4. why is/was goto considered harmful?

basic process

  1. what are the steps from source code to execution (ELF-only is fine)?

[not sure what to categorize this under, but i've been asked a half dozen times]

  1. what is the difference between standard and fast calls?

basic linux

  1. how do you search files in a directory tree for a specific string?
  2. how do you locate files matching a specific set of criteria and then sequentially provide them as input to another program?
  3. how do you list the commands you have previous run?

basic debugging

  1. what are your first steps when the compilation process fails to "undefined symbol {X}"?
  2. what are the common uses of objdump and objcopy?
  3. what are the common gnu-c-toolchain tools and how you use them?
  4. under what circumstances might you need to disassemble portions of your program?
  5. given some variables declared in your function, what is the layout of those variables and other information on the stack?

implementation

basic stdlib (C programming)

  1. convert an integer string to an integer
  2. convert a hex integer string to an integer
  3. write an architecture-efficient memcpy
  4. write a size-efficient memcpy

basic programming (assembly)

  1. count the non-zero entries in an array.
  2. average the integers in an array
  • what complications arise?

basic programming (python)

  1. using list comphrehension, split a string by spaces and only include words

basic programming (javascript)

  1. implement a table given an array of headers and an array of objects (dictionaries)

basic data structures

binary search trees (pseduo or C/assembly)

  1. find the second lowest number in a binary search tree
  2. write the code to delete any node from a binary search tree [can be done recursively...]
  3. linked-lists
  4. delete an item from an unsorted linked-list [too easy, maybe assembly?]
  5. implement a sorted linked-list

uncategorized problem solving

  1. implement an arbitrary length byte array accumulator via quasi-ripple-carry
  2. implement a heap that uses a slab-allocator
  3. given the need for a specifically aligned memory address and size, how do you guarantee allocation of such a block
  4. flip the values in two registers in place without XOR [arm only]
  5. implement the a function to output the fibonacci sequence up to n entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.