DDVO
DataBrick Interview Review
2024.06.5面挂笔记
Examine the knowledge points elasticsearch and reverse Index
What is ElasticSearch?
elasticsearch is an open source search engine used for fast and salable full-text search.
ES uses reverse index to support quick search ability.
When an article is used for indexing, we first split the article into words.
The words are then used to build a reverse index.
index construction
Record which documents each words appears in and where it appears
Example
three documents
1: “Apple is looking at buying U.K. startup for $1 billion”
2: “Apple launches new iPhone in September”
3: “Microsoft to buy U.K. startup for $1.5 billion”
cconstruct reverse index
1 | apple -> [document1, document2] |
when user using elasticsearch to search “Apple startup”
- find word by using reverse Index
“apple” is associated with [doc 1, doc2]
“startup” is associated with [doc1, doc3].
- find the common document of two lists
In this case,
the doc 1 is the common doc.
we gonna return doc1.
Time Complexity Analysis
- index construction
Elasticsearch needs to segment and standardize the input documents, and then update the reverse index.
if we assume there are n word per document on average.
the time complexity will be O(n).
earch word needs to be added in our reverse index.
we can chose hashMap as the basic structure of reverse index.
- Searching
It depending on how many words we gonna use to search.
assume we have M words in total in our searching input.
for each word, we call reverse index(hashMap)—> O(1)
and we need to find the common parts of the lists(which is value based on the search keys in reverse index)
we assume the average len of word in reverse index table(hashMap values’ average len) is K
we need to merge m numbers of list —> O(K * M)
Real Question1: Design a Data Structure for Book Appendix
what is book appendix?
https://books.forbes.com/blog/what-is-appendix-book/

we should design a table the key is the id, and the value is course, state, date and score.
we can choose using hashMap to find the book’s information directly when we are given the key.
and next if we want to get information by other fields, such as State, Date, Score.
we need to build a reverse index to implement that.
using State as example, it can be divided into 50 state.
we use CA state as example.
We build a hashMap, the key is the type of state.
Eg: Key: CA
Value: the books name
Key: CA
Value: The Links at Spanish Bay, Pebble Beach, Spyglass Hill, Laquinta -Mountain etc.
we narrow down our search space firstly.
and we also build another hashMap(reverse index)
Key: CA + Course Name
Value: book Id
first we find the name, which belongs to CA
and then we use CA + Name as the key to find this book
once we got the id, we goona got all the information of this book.
and we can use this logic to service for other field(Date, Score, Book Type)
Real Question2: find the peers in org structure
what is org structure?
https://www.lucidchart.com/blog/types-of-organizational-structures

what means peers?
the guy who is the same level as you.
what kind of information we have?
employee name: xxx
manager name: aaa
manager id: 12
My understanding.
1 | First under the same department: |
1 | find the peers in other deparment: |
1 | If you consider that there are multiple layers of architectural relationships |
Other gains
why databrick?
1 | datawarehouse |
市场上有很多第三方工具可以提供数据收集和处理,为什么不用他们?
1 | 因为我们是小公司,使用第三方比较贵 |
介绍你第一个工作经历中,对于业务上,用户的数据是如何收集的?
1 | 回答的不好,拉了一坨大的 |
1 | 我们收集用户数据,然后根据我们收集的数据 对用户提供财富分析的可视化报告。 |
应该是挂定了
后面是我整理的techinal Interview的面试题
大概按照时间的远近,出现的频率 和 岗位的相关程度排了个等级
一等:
https://www.1point3acres.com/bbs/thread-942306-1-1.html
https://www.1point3acres.com/bbs/thread-1069274-1-1.html
https://www.1point3acres.com/bbs/thread-800479-1-1.html
https://www.1point3acres.com/bbs/thread-1067183-1-1.html
https://www.1point3acres.com/bbs/thread-887099-1-1.html
https://www.1point3acres.com/bbs/thread-1032987-1-1.html
https://www.1point3acres.com/bbs/thread-1032987-1-1.html
https://www.1point3acres.com/bbs/thread-1028271-1-1.html
二等:
https://www.1point3acres.com/bbs/thread-933556-1-1.html
https://www.1point3acres.com/bbs/thread-936511-1-1.html
https://www.1point3acres.com/bbs/thread-948352-1-1.html
https://www.1point3acres.com/bbs/thread-956383-1-1.html
https://www.1point3acres.com/bbs/thread-1001685-1-1.html
https://www.1point3acres.com/bbs/thread-1021201-1-1.html
https://www.1point3acres.com/bbs/thread-1020796-1-1.html
三等:
https://www.1point3acres.com/bbs/thread-1055197-1-1.html
https://www.1point3acres.com/bbs/thread-1028322-1-1.html
四等:
https://www.1point3acres.com/bbs/thread-1063612-1-1.html
https://www.1point3acres.com/bbs/thread-1032322-1-1.html
https://www.1point3acres.com/bbs/thread-1017756-1-1.html
https://www.1point3acres.com/bbs/thread-1020051-1-1.html
https://www.1point3acres.com/bbs/thread-818999-1-1.html
https://www.1point3acres.com/bbs/thread-1025319-1-1.html
https://www.1point3acres.com/bbs/thread-1026031-1-1.html
https://www.1point3acres.com/bbs/thread-1025247-1-1.html
https://www.1point3acres.com/bbs/thread-1061965-1-1.html