DEV Community

Petros Demetrakopoulos
Petros Demetrakopoulos

Posted on

11 weird questions I was asked in interviews

  1. How much is 17x17?
    The answer is 289 and of course, I answered it wrong. However, the recruiter which asked this question mentioned that he did it to “check how I think” so I believe he would like to see me thinking that 17x17 is 17^2 which is (10 + 7)^2 which expands to 10^2 + 2x10x7 + 7^2 which equals 100 + 49 + 70x2 = 289.
    Pretty weird though.

  2. Do you know how Shazam works?
    In layman’s terms, Shazam captures a sound sample of a song and then analyses it into a table of frequencies that the song contains and how frequently these frequencies are presented in a specific song. This distribution of frequencies is unique for each song and thus a song can be uniquely identified by it. This is achieved with algorithms and methods like Discrete Fourier Transform (DFT) derived from the fields of signal processing, mathematics, and physics. You can find more about how Shazam works on this awesome blog post.

  3. What was the most self-explanatory and streamlined solution you provided in a complex programming problem you faced?
    As you can guess, there is no right or wrong answer to this question and it is personal and different for everyone. I answered with a solution I provided to a queue waiting problem. My team and I solved the problem in the database level of the app with SQL stored procedures and triggers.

  4. What is the most important thing that your parents offered you?
    This was a tricky one. I answered that one of the most important things that my parents offered me was

    • Tuition in 2 very good private schools. I explained that the overall experience that these schools offered me was much more than just better teachers and better education. These 2 schools offered me many opportunities in culture, sports, science clubs, etc.
    • My parents also offered me many stimuli and incentives to fill my spare time. Walks in art exhibitions, museums, performance of science experiments at home during the weekends, and of course coding were some of them.
  5. What is the difference between a process and a thread?
    I had to remember some basic principles from the Operating Systems course in university to answer this correctly. The difference is crucial and simple: Both threads and processes are “independent sequences of execution”. However, threads that run on the same process, run in a shared memory space while processes run in separate memory spaces. This StackOverflow answer makes it pretty clear.

  6. Would it be able to create a server running in a PC monitoring all the transactions of Ethereum blockchain in real-time?
    The answer is no. According to this StackExchange answer, “Syncing the Ethereum blockchain with Geth in --fast mode has two phases running in parallel: block sync and state trie download. Both phases need to be done in order to have a full node and switch to full mode where every transaction is executed and verified. The block sync downloads all the block information (header, transactions). This phase uses a lot of CPU and space to store all the data. However, in fast mode no transactions are executed, so we do not have any account state available (ie. balances, nonces, smart contract code and data). Geth needs to download and cross-check with the latest block the state trie. This phase is called state trie download and usually takes longer than the block sync. When you are between 64 and 128 blocks behind, it usually means you finished the block sync phase and during the state trie download phase, the block number count will always oscillate between 64 and 128 blocks behind the latest block mined on Ethereum. This is normal until the state trie download phase ends and your node is fully synced. However, using an HDD, you might not be able to keep up and have a high enough disk write rate to catch the head (latest state entry).
    My personal experience is that the SSD in my MacBook Pro failed to sync too due to disk rate and disk space, so it is not possible to sync the entire Ethereum blockchain with a typical personal computer.

  7. Why do you prefer React over Angular?
    I know that React is a library and Angular is a framework and thus comparing them may seem like comparing Apples to Oranges. However I answered that I prefer React because it is more lightweight in terms of payload (in front-end development, the payload of a library or framework is something that a developer should really care about because it may be used by mobile or really slow internet connections) while it offers exactly the same functionality. I also explained that the so-called 2-way binding functionality of Angular is not really missing from React, as React accomplishes the same result using state.

  8. Did your team write tests in your previous job?
    The answer there was pretty simple and straightforward. Yes, in my previous job the team wrote tests, we had an organized CI/CD track that ran all the tests before the deployment. I also mentioned we used multiple git branches for the different development and deployment stages (development, staging, production, etc.)

  9. What is the difference between git rebase and git merge?
    Git rebase and merge are both used to integrate changes from one branch into another. Their difference lies in how this result is achieved. The main difference is that git rebase moves a branch into master as it is while merge adds a new commit (a merge commit) preserving the history and chronological order. We could say that merge preserves the commit history as rebase re-writes it. You can learn more about git rebase vs git merge in this awesome Atlassian tutorial.

  10. What is the difference between UNION and UNION ALL in SQL?
    UNION SQL command is used to combine the results of 2 or more SELECT statements. The difference between UNION and UNION ALL is that UNION eliminates duplicate records while UNION ALL preserves them. As you can imagine, using UNION instead of UNION ALL has a drawback in performance since the DB server must do additional work to remove duplicate rows.

  11. From which club did you get your sailing license?
    A funny one, probably the recruiter used it as an ice-breaker. He was a licensed open sea sailing captain too, so he asked in which club I did the courses and if I had ever taken part in sailing races.


Apart from the classic interview questions, these were some that I found interesting and/or weird. If you have any experience with interesting or weird interview questions, feel free to discuss them in the comment section.

Top comments (1)

demetrakopetros profile image
Petros Demetrakopoulos

I also created this awesome list repo on Github It is a curated list of coding projects assigned by recruiters after an interview for a software development position.