Location>code7788 >text

Big Factory Interview: Wordpress iOS Developer Internship - Flybook

Popularity:700 ℃/2024-07-31 23:11:40

Oh, man.

Online interview, total length about 1h30mins

Overall Process.

0. Self-introduction (0-2mins)

1. Harder things to do (15min)

I talk about a low open platform I wrote before, wrote an undo fallback function, raised a pr, used throttling, used the command mode

1.1. How does throttling work? Where is it used? Why is it used?

Does 1.2.throttle the previous trigger to just CLEAN or how do you handle it? Does it clear out some key changes?

Does 1.3 cause certain changes to not trigger? How can it be better optimized?

 

2. Front-end knowledge + computer four big pieces of copying (25min)

2.1. difference between user state and kernel state?

(I forget. Just jump.)

2.2. what happens during an https or http connection?

Talked about tcp, dns proxy return ip

Then ask 2.2. three times about the handshake process?

2.2.2. unique identifier role during handshake?

2.2. The parsing process, how is it done?

   

2.3. How many layers are there in the TCP/IP protocol? What does each layer do?

2.3.1. Why layering?

2.4 Have you ever used Rust? (I don't know what the question was, but I think it was this one)

No, just jump.

2.5. what design patterns have been used, expand on them?

I talked about the subscribe-publish model, the command model.

2.5.1. what problem does the command model solve?

2.5.2. How does the publish-subscribe model work? What problem does it solve?

2.6. What data structures were used? Why? How?

 

2.7. Asynchrony: Do you know anything about it? Tell me about asynchrony.

 

3. Algorithms (35min)

3.1. Algorithm I (20 min)

sum of the three numbers (math.)

Title Description

Given an array of N numbers, how do you determine that the sum of three numbers is equal to a certain number, each number can only be used once

let number = [10, 21, 3, 14, 5...]​

input: 9​

output: true​

input:2​

output: false

Requirements Code Implementation

know how to write

 

3.2. Algorithm II (10 min)

Data sources: a->i, b->ii , c->iii, d->iv

Inputs: a returns [one, three], ab returns [three], b returns [two, four], bc returns [four]

Asked to give ideas that

The interviewer gave a hint that it was similar to the Pinyin input method, which was implemented using trees.

My sister answered.

 

 

4. Concluding rhetorical questions (10 min)

 

5. Algorithmic Answer Supplement

5.1. first question.

 

function threeSum(nums, target) {
    ((a, b) => a - b);
    for (let i = 0; i <  - 2; i++) {
        let left = i + 1;
        let right =  - 1;

        while (left < right) {
            const sum = nums[i] + nums[left] + nums[right];

            if (sum === target) {
                return true;
            } else if (sum < target) {
                left++;
            } else {
                right--;
            }
        }
    }
    return false;
}

 

has a complexity of O(nlogn)

The outer loop is n-2, the inner loop is n-1, counting O(n^2)

Average complexity is O(n^2)

 

 

5.2.Second question.

 

Implemented using a prefix tree

 

A group of words, adv, age, ant, ate, inn, int.

 

Using a prefix tree to store it would look something like this.

 

 

 

class TrieNode {
    constructor() {
         = {};
         = [];
    }
}

class Trie {
    constructor() {
         = new TrieNode();
    }

    insert(key, output) {
        let node = ;
        for (const char of key) {
            if (![char]) {
                [char] = new TrieNode();
            }
            node = [char];
        }
        (...output);
    }

    search(key) {
        let node = ;
        for (const char of key) {
            if ([char]) {
                node = [char];
            } else {
                return [];
            }
        }
        return ;
    }
}

// initializationTrieset up
const trie = new Trie();
('a', ['"one" radical in Chinese characters (Kangxi radical 1)', 'surname San']);
('ab', ['surname San']);
('b', ['stupid (Beijing dialect)', '4']);
('bc', ['4']);

// consult (a document etc)
(('a')); // exports: ['"one" radical in Chinese characters (Kangxi radical 1)', 'surname San']
(('ab')); // exports: ['surname San']
(('b')); // exports: ['stupid (Beijing dialect)', '4']
(('bc')); // exports: ['4']

 

6. Summarizing and reflecting

From the whole overall interview process, the big factory is still more focused on the foundation, the four pieces and algorithms, hard to fill in the