---
# System prepended metadata

title: Interview Questions

---

Interview Questions
====

- node.js
- 


Git
----
- 
-


Adhoc
----
- why would you prefer the use of arrow functions in to `function`

- interface vs type


Typescript
----
- task {
    - enum -> as const
    - generics
}
 
1. define data type for transport-in data
2. define data type for transport-out data
3. fetch
4. filter
5. transform {name, id, sound} => [id, name, sound]
6. attach to response


Testing
----
### TDD
- Q: lifecycle of tdd
    - Expect: [create test file, write failing test, implement function to pass, refactor, ...] 
    - Actual:


Algo
----
- If I ask you to find a specific number in a sorted array, how do you do that? What would be the complexity?
    - E:  [binary seach with complexity O(log(n))]
    - A: 

- given a string find the most repeated character
    - E:  [map]
    -     brute force
- Detect a loop in a liked list
    - E: modify linked list class to use a "visited" flag
    -    use a hashmap for storing nodes and check if has already been added

OOP
----
- extract classes from "Parking Lot"

Design Patterns
----
- How the Factory Method pattern works and what's the advantage of using it?
- What's the adapter Method?
- What are the advantages to use composition over inheritance?


Blockchain/Solidity
----
- interaction with BC/SC
- Q: how blockchain works
    - Expect: 
        - what mining is (bitcoin)
        - cryptography
        - P2P
        - content of a block
    - Actual: 
        -    

- Q: what is a smart contract
    - Expect:
        - executable procedure store in a block
        - immutable, can be upgraded via proxy
        - executes on all nodes simultaneously
    - Actual:
        - 

- Q: what is a dApp
    - E:
        - front-end app in combination with one or more SCs
        - calls the contracts via a wallet or RPC http request directly

