# Interview
## Self introduction
Hi, My Name is Hank. Currently I'm studying in information management at Taiwan tech with master degree. During the master, I mainly research recommender system domain. in my career, I have four internship experience.
(DDOS, refactor)
For the first internship, I've involed two projects using AWS cloud service, the first project, I was resposible for the DDOS project of backend. The project
The second one, I refactoed for frontend project using React langauge.
(data engineer)
The second internship, I was data engineer in 友達光電, I was resposible for analyzing the internal machine data, finding the key factor to see the impact.
During my processing, including collect raw data, preprocess, build the regression or bossting model, and write the some automic code to run the auomaiton procedure
(UI, refactor)
The third internship, I was the frontend engineer in startup company, I developed the UI component and refactored frontend UI using React.
For the refacting frontned, I made the some rule and import the coding style to make the project more filexible and clean.
(SDK, demo_site, ETL)
The final internship, I was the solution engineer in appier, In company, I mainly involed three project,
The first project is internal frontend SDK, in this project, I developed some UI component based on client reqirements, and delivered to production enviroment.
the second one is demo_site system, the system it show recommendaiton system result which data scientist trained. We use the template to handle to multple client. in this project, I add the some UI feature. and I develivery the data to database from the model result.
The final one is ETL project, based on our client want a dashboard to add their datafeed that the data scientist can train modle.
Then we design the ELT project, I deisgned the whole backend system. We define cofign then tramsform column name to another column, also I design the module concept to handle the sepcial case. the sepcial case like do the function for specfic function, like hash or turn to json format.
## System design
Link: https://hackmd.io/JfJlvRZHRaqod7MPlUlLSQ
## Leetcode
## Coding language
Link: https://hackmd.io/5cdDP9ZVQS6w7cg6WGEWWQ
## BQ
Link: https://hackmd.io/RGFPMPZaQnWbnzPRSjpxTA
## Famous Company
- Google
- MS
- Foodpanda
- Houzz
- Caorusell
## Special
Link:
As a game becomes more complicated, it is not uncommon to optimize the above simple Minimax algorithm with extra functionality (such as heuristic evaluation and Alpha-Beta pruning), however, the principle remains the same. The non-linear nature of the tree data structure is what allows the Minimax algorithm to logically evaluate the best possible move for a given player and board state.
### tic tac toe
```=python
import random
class TicTacToe:
def __init__(self):
self.board = []
def create_board(self):
for i in range(3):
row = []
for j in range(3):
row.append('-')
self.board.append(row)
def get_random_first_player(self):
return random.randint(0, 1)
def fix_spot(self, row, col, player):
self.board[row][col] = player
def is_player_win(self, player):
win = None
n = len(self.board)
# checking rows
for i in range(n):
win = True
for j in range(n):
if self.board[i][j] != player:
win = False
break
if win:
return win
# checking columns
for i in range(n):
win = True
for j in range(n):
if self.board[j][i] != player:
win = False
break
if win:
return win
# checking diagonals
win = True
for i in range(n):
if self.board[i][i] != player:
win = False
break
if win:
return win
win = True
for i in range(n):
if self.board[i][n - 1 - i] != player:
win = False
break
if win:
return win
return False
for row in self.board:
for item in row:
if item == '-':
return False
return True
def is_board_filled(self):
for row in self.board:
for item in row:
if item == '-':
return False
return True
def swap_player_turn(self, player):
return 'X' if player == 'O' else 'O'
def show_board(self):
for row in self.board:
for item in row:
print(item, end=" ")
print()
def start(self):
self.create_board()
player = 'X' if self.get_random_first_player() == 1 else 'O'
while True:
print(f"Player {player} turn")
self.show_board()
# taking user input
row, col = list(
map(int, input("Enter row and column numbers to fix spot: ").split()))
print()
# fixing the spot
self.fix_spot(row - 1, col - 1, player)
# checking whether current player is won or not
if self.is_player_win(player):
print(f"Player {player} wins the game!")
break
# checking whether the game is draw or not
if self.is_board_filled():
print("Match Draw!")
break
# swapping the turn
player = self.swap_player_turn(player)
# showing the final view of board
print()
self.show_board()
# starting the game
tic_tac_toe = TicTacToe()
tic_tac_toe.start()
```
- game tree
- minmax algo
- alpha beta pruning
如果對方每一步決策都是完美的,則我方可以達到預計的最小損失格局,如果對方沒有走出完美決策,則我方可能達到比預計的最悲觀情況更好的結局。總之我方就是要在最壞情況中選擇最好的。