kylekylehaha
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 群聯面試 Phison Interview contributed by <`kylekylehaha`> `On Site Interview` 面試前一個半小時為考試,主考 C, OS 和 計組。 ## C programing 第一份總共有六題。 ### 1. Bitwise 操作 a.) get `x` the 18th bit -> `return (x & (1 << 17))` b.) set `x` the 18th bit to 1 -> `return (x | (1 << 17))` c.) clear `x` the 18 bit 0 -> `return (x &~(1 << 17))` d.) toggle `x` the 18 bit -> `return (x ^ (1 << 17))` ### 2. Revesrse String `str[] = '12345', please reverse the string.` Solution: ```cpp= int i = 0; int j = strlen(string) - 1; while(i < j){ // swap char tmp = str[i]; str[i] = str[j]; str[j] = tmp; i++; j--; } ``` ### 3. Finish BinarySearch code `bool BinarySearch(int *arr, int startIndex, int endIndex, int target);` Solution: ```cpp= int midIndex = startIndex + (endIndex - startIndex) / 2; if(startIndex < endIndex){ if(arr[midIndex] == target){ return 1; } else if (arr[midIndex] > target){ return BinarySearch(arr, startIndex, midIndex - 1, target); } else{ return BinarySearch(arr, midIndex + 1, endIndex, target) } return 0; } ``` ### 4. struct (記憶是考 struct 佔多少的 byte,但有點忘了。) `請計算下列 struct 佔多少 byte` ```cpp= struct{ int a; int b; char t; char b; }; ``` ### 5. output `判斷下列程式的 output 為何?` ```cpp= unsigned int i; for(i=10; i>=0; i--){ printf("%d\n", i); } ``` Solution ``` 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, .... ``` 因為是 `unsigned int i`,所以 `i` 永遠會 >=0,for 迴圈不會終止。 ### 6. 利用 Linked list 實作 queue 實作下列 function - `push(data)` - `pop()` - `getfront()` - `getrear()` - `isEmpty()` - `getSize()` Solution [Queue - Linked List](https://www.geeksforgeeks.org/queue-linked-list-implementation/) --- ## OS 和 計算機組織 另一份題目有點多,有 25 題。題目有分必寫題(粗體),剩下的題目則是自己選 3 題來寫。 - **cache write through / write back + MESI補充** - **global variable, local variable, static, volatile** - **Call by value, Call by reference** - **stack 和 heap 的不同** - **Race condition** - **Function interrupt & ISR** - RISC 和 CISC 差別是什麼? - TLB(translation lookaside table) - 什麼是 hash map,請舉生活中用 hash map 的場景 --- ## 面試流程 接著就是自我介紹以及主管面談,其中主管還出了一題白板題:(後來發現根本就是 [leetcode #27: remove element](https://leetcode.com/problems/remove-element/description/?envType=study-plan-v2&envId=top-interview-150)) ``` unsorted array arr[] = {1, 2, 3, 3, 5, 7}, target = 3 請把不是 target 的放在前面,並且 return 整個 array。 也就是 array 前面項為 [1, 2, 5, 7] 即可。不需處理後續的資料 ``` 我是用 quicksort 的概念,將不是 target 的值 swap 到前面,target 移到後面. Time complexity = O(n) ```cpp= int* func(int *arr, int size, int target){ int i = -1; int j = 0; for(j=0; j<size; j++){ if(arr[j] != target){ i++; swap(&arr[i], &arr[j]); } } return arr; } ``` 工作內容: - 新人會有三個月的新人訓,期間會走整個產品流程(前, Algo, 後),讓你稍微了解。預計4-5個月。透過影片教學,2-3周會有 meeting 和考試。 - 半年後開始解決小問題,一年後有能力解決問題。 - 考績: 看貢獻,而非年資。一年調一次薪 - 部門目前 17 人,預計成長到 30 人 --- ## 心得 一開始先寫 90 分鐘的考卷,不用一開始就面對主管,其實心裡是放鬆不少。藉著這段時間好好整理思緒、調整心態。考題也和網路上的題目差不多,沒有太大的不同。計組, OS 要好好準備,重點就那些,穩穩念就不需擔心寫不出來。 自我介紹時主管會問有沒有資料可以呈現或提供的,我是有準備一份紙本履歷以及 ppt。ppt 就直接拿自己筆電出來報,沒有限時。重點是要讓主管知道你的為人、個性,如何在短時間讓主管認識你才是自我介紹的目的。 最後總共面了五個小時,途中主管面完後還有大主管也來面。整個過程是自在,主管們不會太刁難,當成一次面談,認識對方,也讓對方認識你的心情來面。 **結果**: 感謝函

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully