Section
- Interview step
- Behavior Question
- Question For facebook
- Complexity
- Helpful-tool
- Example Problem
- Python Syntax
- Other Source
- Ask question. Ask a lot of question. Often time question is ambiguous.
- commmunicate to interview what approach would be
- step:
- We understand the problem
- Asked clarifies the problem
- Explained our high level approach
- Write code
- test case
- memory and space efficientcy
- Is there anyway to improve
- If you have any question.
-
Tell me about yourself. Ex1
- Who Am I?
- junor majoring in computer engineering at UNL.
- Strong background in electronics and programming.
- Why are you qualified?
- Lots of expereience with online coding repository. I love to contribute as much as I can from Hackathon as well as online programming contest
- Highly motivated and extremely passionate about developing. I am also always up-to-date with the newest technology trends and willing to try the latest thing.(GCP if there is follow up)
- Why are you here?
- Although I love my current role
- I ready for a more challenging assignment,
- THis prosition really excited me.
- Who Am I?
-
How would people describe you?
- Describe me as a good communicator b/e I am alway alble to articulate peoples’s needs whether it is my client or teammate.
- Pick up subtle hints and nonverbal cues,
- I believe this help contributed to my success. For ex, recently I were invited to be a GCP student innovator. Goal: Work with Google team to promote GCP product.
-
Tell me about your best collaboration experience
- I learn during a big robotic competion. Administrative support is the key for teamwork.
- So many moving part. Simulated apple harvesting.
- Split into multiple grp. Image processing. mobile platform. Roboitc arm.
- What make this become best is that I learned that it is not about doing what you are good at.
-
What do you do to stay motivated
- Read book. Psychology book
- Book about the brain
- Fascinating on knowing how the brain work.
- Read book. Psychology book
-
How do you build relatioship?
- Personal, This can be view as weakness and strongest.
- I often stay to focus on a task.
- At work, If my college email to ask question(from other side of the room. I often ignore them)
- Building relationship is about interacting.
- tell colleue to call or give me a tap. So we can interact better
- Personal, This can be view as weakness and strongest.
-
What would you do if an interview didn’t show up?
- Thing happen like that are unusual. Stuck traffic. or wrong addres.
- I would give him a call. or leave a message saying “We were looking forard to our call at x oclock. I am sorry we couldn’t connect. I hope everything is OK. Please let me know if you like to reschedule”
-
What is one project that you are proud of?
- I believe in the power of datascience and AI. we have seen multiple example of datascience app help cure cancer.
- My attempt is put effort and make impact.
- With little deep learning technique back gorund and great data souce. we built sentree. An violence detection. Attempt ed to intergrate with security camera.
- we did not get any price out of the hackathon. But we believe this project grotwth.
-
Why do you want to work for facebook?
- Personal story. When I first come to the US. Facebook is the only thing that keep my friend ship going.
- To give people the power to share and make the world more connnected
-
Why do you want to work for us?
- I believe in power of datascience and information processing.
- I believe in an iterative learning process.
- My first learning step to the datascience world is to improve myself as a software engineer
- Why at Sandhill you ask? Sandhill is one of the leader in information processing. first step.
- Sandhill serve a diverse range of industries with diverse range of product.
- from trade publication and website hosted technology services.
- Sandhill is one of the leader in information processing.
-
Tell me about time you had a disagreement with your manager.
- I often have a lot of disagreement. We often solve it really well.
- My professor recently ask me to lead a group of student to replicate my project an IOT weather station. He told me to come every week and answer question if the student have.
-
- within 2-3 years I would like to expand my knowledge of the information and web service industry from what I know now to what I am comfortable with.
- See myself from a team player to a team leader and growth with the company
- So I can see the bigger picture of the company focuses.
- within 5yrs, I see myself becoming be true expert and master at my role as software engineering.
- Extend my expertise and offer help to other department, whether it be hardware or software technology.
-
Describe a situation when you did much more than it was expected from you to get the project done. Were your efforts recognized? By whom and how? How did that make you feel?
- When I start something I like to put my shole heart and effort.
- Recently we started a project in our software engineeering course. City Traffic simulator.
- School work everyone just want to get it done.
- Doing more is to spend time thanking purpose on what I am doing.
- IN my case, purpose on building is about helping a construction company to build software that allow them to analyze the traffic density and thus help them plan ahead for their construction company. decrease traffic stuck.
- Anything I do need to impt. samll or big.
- Feeling: Accomplish as little as possible. Motivate my team is my little accomplishment.
-
Tell me about a time when you took ownership of a project. Why did you do this? What was the result of you taking the challenge? What could have happened if you did not take ownership?
-
happend during last, month hackathon.
-
We started by throwing out idea out loud.
-
But I thought that this idea does not work out.
-
If we thnk about it. It is almost impossible in begin in a group of people without instinctively mirrowing, mimicking their opinions.
-
There can exist a best talker in a group. I believe that there is no correlation between best talker and best idea.
-
I deceied to take leader ship. I urged every to speak for their own idea. Together we decied to it alone for 30 minute and think of our idea.
-
Then write it visually on the board and talk out loud.
-
We did not win any prize but we believee that WE had one of the most innovative idea. and believe our project can growth.
-
-
Tell me about a time you had to work on several projects at once. How did you handle this?
- I believe in a small iterative lerarning process.
- Work on each project for a small amount of time every day. If I focus on one and do spend trunk of time for one I will forget other.
- Stop after a certain period of time no matter if I am in a period of somthing
-
I’d be interested in hearing about a miscommunication you had with your supervisor. How did you solve it? What was the reason for that? How did you deal with that situation?
- My professor often busy. We email alots.
- We work on multiple project. We have meeting once per 2 week for our research group. Once I Could make it to meeting and he heard me some other days.
-
What do you know about Sandhill?
-
serve diverse range of industrial product from trade publication, algricultural, and website hosting technology.
-
The mission of the company is to provide reader with accurate, timely information when they need it.
-
Sentree
- tag:
Deeplearning|JS|HTML|public - attempt to build a surveillance system that can potentially integrate with public security camera. Goal is to detect violence scene. Mainly work on the back end. designing the deep learning model as well as the integration between Python and JS.
- tag:
-
Bone Age classfier
- tag:
Machine learning|JS|HTML|healthcare - Attempt to give doctor an extra set of vision to assist on predict and analyze X-ray image.
- IBM Watson API. I mainly help with the frontend and integration between Python and Javascript. and building the website.
- tag:
-
Online coding repository
- tag:
Google code Jam|Advent of code|CodeForce|Google Hashcode
- tag:
-
Deep learning research project
- tag:
Deep learning
- tag:
-
Movie ticket management system
- tag:
SQL|Java| - An advance solution on modeling a movie ticket system. We build it the project from scratch. we took care of the front and backend with java and SQL database.
- tag:
-
City traffic simulator
- tag:
Java|JS| - Class project. solution to help construction company plan ahead for there project.
- tag:
-
Google cloud platform
- tag:
Big Query|SQL|Machine learning|kurbenetes
- tag:
-
Start a coding question.
- before code: like to think
- prefer this to be a “work together”: feedback on What I think rather than me giving letcture
- Mock google interview
- Mock google interview Link
- Tell me about your self
- Graduate from this school. Project that I did.
- Little project that you do. Think little
- Talk about technical leadership.
- Junior: technical complexity: tradeoff. Object oriented design
- Impact of the project.
- Don’t bored the interview.
- You be view as cannot communicate
- Challenge question
- Not about many people solve. It is about how you solve it
- You are being evaluated to get to senior engineer
- Ask question
- Don’t ask what is the answer for the question.
- It is not about getting the answer question. It is more about the thought process. Understand how to approach and knowing the trade off.
- Did you consider using hash, array,
- Don’t be a jerk.
- How to Get a Job at the Big 4 - Amazon, Facebook, Google & Microsoft’ by Sean Lee?
-
Say, I am at least this good.
-
Why big 4? language can be thought quickly. The concept or logic communication skill cannot be thought overnight.
-
If you know how to code. It is easier to get a job.
-
main
-
Step1: get an interview somehow.
-
Step2: Do good.
-
It is simple but it is not easy.
-
Work on side project. Participate in a hackathob.
-
Programming challenge
-
Coding question;
- Cracking the coding interview(CtCI)// best
- Programming interview exposed(PIE)// new. No OOP
-
Mostly no behaviorial question
-
How are you practicing?
-
Find a friend. Not more than 3
-
Around your level.
-
Discuss. Pick on what they knw.
-
Mock interview.
-
the best Solution is not the fastest, not simplest, the one the interviewer knwo the best solution.
- ex: If you ask to print permutation. and You say that you can do it recursively. and interviewer ask for recursively. then give give the recursion one.
-
If ask
is it possible to do it other way?Big hint:You need to do it the other way -
Changing is part of their job. Like professional alethe
-
Start changing and practicing.
-
If you get nothing this year. Then you are preparing for next year.
-
If you start practicing after you get the interview schedule. Then you are already toolate.
-
“Sucess is like being pregnant. Everyone congratulate you. But no one ask how many time did you get screw to get their.”
-
good thing about resume. It don’t tell you how many time you fail.
-
Be hungry and stay foolish
-
Skill improve luck. faster way: Keep applying and keep practicing.xs
- Difference between client-side and server side
-
client-side: ASP software create on web server.
- environment run script on a browser. processing take place in use computer. src code got transfer from webserver to the user computer over internet.
- The benefits of client-side processing in an ASP.NET web application are programming languages like C# and VB.NET along with the .NET Framework.
- Languages like C# and VB.NET sit on top of the .NET framework and have all the benefits of object oriented architectures like inheritance, implementing interfaces and polymorphism. -
server-side: ASP.net -
run scripting language on web server. user request is fullfill be running a script on web server to generate dyanmic HTML content.
-
- What is it like to work at facebook?
- What is a typical day like
- what is the culture at facebook like?
- what is your favorite part of facebook?
- What do you like most working here?
- Question: When typing on a touch screen, occasionally the wrong key word is registered.
- ex:
- When typing “Hello”, a “G” might be register instead of H
- Goal: write a function that given a strin, returns all nearby words
- helper function:
// for a given character return all nearby char
given get_nearby_chars(string schar): set<string>
ex: input: h return g,h,j
// for a given word get all possible nearby word
function near_by_word(string sword): set<string>
//TODO:implement
// for a given word get all possible near by word.
function nearby_words(string swrd): set<string>question:
What format is the word given to us? string
how do we define nearby word? any word. any word given by near_by_word function
do we need to remove duplicate word in the output?
does output need to be sorted?
- COnvert number to binary in python `"{0:b}".format(A)` A: is a number
- Count # of occurence in oython count('char')- Given a positive integer which fits in a 32 bit signed integer, find if it can be expressed as A^P where P > 1 and A > 0. A and P both should be integers.
NOTE: this line (checkInt > .99999 and checkInt <= 1) check for odd case.
- ex: input: 823543 OUTPUT: True b/c 7^7 = 823543
- without the line above checkInt variable would return .99999999999999991 . Well 7th root of 823543 is 6.99999999991 which suppose to be 7 but there is something going with the root function then.
# @param A : integer
# @return a boolean
def isPower(self, A):
<span class="token comment"># iterate from 2 - 32 </span>
<span class="token comment"># then find the root on (2-32) root on given number </span>
<span class="token keyword">if</span><span class="token punctuation">(</span>A <span class="token operator">==</span> <span class="token number">0</span> <span class="token operator">or</span> A <span class="token operator">==</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">return</span> <span class="token boolean">False</span>
<span class="token keyword">elif</span><span class="token punctuation">(</span>A <span class="token operator">==</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">return</span> <span class="token boolean">True</span>
<span class="token keyword">for</span> i <span class="token keyword">in</span> <span class="token builtin">range</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">32</span><span class="token operator">+</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
root <span class="token operator">=</span> <span class="token number">0.0</span>
root <span class="token operator">=</span> <span class="token builtin">float</span><span class="token punctuation">(</span><span class="token builtin">float</span><span class="token punctuation">(</span>A<span class="token punctuation">)</span><span class="token operator">**</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">/</span><span class="token builtin">float</span><span class="token punctuation">(</span>i<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
checkInt <span class="token operator">=</span> <span class="token builtin">float</span><span class="token punctuation">(</span>root <span class="token operator">-</span> <span class="token builtin">int</span><span class="token punctuation">(</span>root<span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token keyword">if</span><span class="token punctuation">(</span>checkInt <span class="token operator">==</span> <span class="token number">0</span> <span class="token operator">or</span> <span class="token punctuation">(</span>checkInt <span class="token operator">></span> <span class="token punctuation">.</span><span class="token number">99999</span> <span class="token operator">and</span> checkInt <span class="token operator"><=</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">:</span><span class="token comment"># if the number is interger. no floating</span>
<span class="token keyword">return</span> <span class="token boolean">True</span>
<span class="token keyword">return</span> <span class="token boolean">False</span>
- REACH. You are in an infinite 2D grid where you can move in any of the 8 directions :
(x,y) to
(x+1, y),
(x - 1, y),
(x, y+1),
(x, y-1),
(x-1, y-1),
(x+1,y+1),
(x-1,y+1),
(x+1,y-1) You are given a sequence of points and the order in which you need to cover the points. Give the minimum number of steps in which you can achieve it. You start from the first point.
- code
def coverPoints(self, X, Y):
#complexity: n(begin number of point.
total = 0
for i in range(len(X)):
if(i == len(X)-1):
break
yDiff = abs((Y[i+1]-Y[i]))
xDiff = abs(X[i+1]-X[i])
total = total + max(xDiff, yDiff)
return total- maxdigit Given a string S of digits(0-9), your task is to find the maximum value that can be obtained from the string by putting either ‘*’ or ‘+’ operators in between the digits while traversing from left to right of the string and picking up a single digit at a time.
- Geekforgeek
def maxDigit(S):
if(S == None): return 0
optimize = int(S[0])
for i in range(1,len(S)):
optimize = max(optimize*int(S[i]), optimize+int(S[i]))
return optimize int count = 0;
for (int i = N; i > 0; i /= 2) {
for (int j = 0; j < i; j++) {
count += 1;
}
}-
sol
-
In the first iteration, the j loop runs N times.
-
In the second iteration, the j loop runs N / 2 times.
-In the ith iteration, the j loop runs N / 2^i times. -
So, the total number of runs of loop = N + N / 2 + N / 4 + … 1
-
= N * ( 1 + 1/2 + 1/4 + 1/8 + … ) < 2 * N
- Gcd
https://www.geeksforgeeks.org/euclidean-algorithms-basic-and-extended/
int gcd(int a, int b) {
if (a == 0)
return b;
return gcd(b % a, a);
}- check for prime
/**
* This funuction attempt to check if a number is prime
* Consider the following algorithm to determine if an
* integer x is prime: for each integer y from 2 up to the square root of x, if y divides x,
* then x is composite (not prime). Otherwise if no such integer in that range divides x,
* then x is prime.
*/
int isPrimeSqrt(int n){
// check for corner case
if(A < 2) return 0;
int i;
for(i=2;i<sqrt((double)n)+1;i++) if(n%i==0) return 0;
return 1;
}// tree structure
#include <iostream>
#include <string> // C++ string class
using namespace std;
struct TreeNode{
int value;
TreeNode left;
TreeNode right;
<span class="token function">TreeNode</span><span class="token punctuation">(</span><span class="token keyword">int</span> val<span class="token punctuation">)</span><span class="token punctuation">{</span>
value <span class="token operator">=</span> val<span class="token punctuation">;</span>
left <span class="token operator">=</span> <span class="token constant">NULL</span><span class="token punctuation">;</span>
right <span class="token operator">=</span> <span class="token constant">NULL</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
};
void treeAdd(TreeNode *¤tRoot, int newVal){
if(currentRoot == NULL){// base case;
currentRoot = new TreeNode(newVal);
return;
}else if(newVal < currentRoot->value){
treeAdd(currentRoot->left, newVal);
}else{// add to right if newVal is >
treeAdd(currentRoot->right, newVal);
}
}
/**
This function print out the tree in a mess
/
void brutePrintTree(TreeNode ¤tRoot){
if(currentRoot != NULL){
cout << currentRoot->value << "->";
brutePrintTree(currentRoot->left);
brutePrintTree(currentRoot->right);
}else{
return;
}
}
string inorderHelper(TreeNode *¤tRoot){
if(currentRoot == NULL){
return "";
}
if(currentRoot->left == NULL && currentRoot->right == NULL){
return to_string(currentRoot->value);
}
return "" + inorderHelper(currentRoot->left)+"->" + to_string(currentRoot->value) +"->"+ inorderHelper(currentRoot->right);
}// end inorderTraversal
void inorderTraverse(TreeNode *&root){
cout << inorderHelper(root)<< endl;
}
/**
This function traverse the tree in inorder and printout each node
visit: L -> N -> R
*/
int main(int argc, char argv){
TreeNode *root;
root = NULL;
treeAdd(root, 10);
treeAdd(root, 14);
treeAdd(root, 4);
treeAdd(root, 20);
treeAdd(root, 23);
treeAdd(root, -1);
treeAdd(root, 2);
brutePrintTree(root);
cout<span class="token operator"><<</span> endl<span class="token operator"><<</span> <span class="token string">"INORDER ======"</span> <span class="token operator"><<</span> endl<span class="token punctuation">;</span>
<span class="token function">inorderTraverse</span><span class="token punctuation">(</span>root<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
}8.1 Given a sorted linked list, delete all duplicates such that each element appear only once.
- For example,
- Given 1->1->2, return 1->2.
- Given 1->1->2->3->3, return 1->2->3
public ListNode deleteDuplicates(ListNode a) {
ListNode current = a;
while (current.next != null) {
if (current.val == current.next.val) {
current.next = current.next.next;
} else {
current = current.next;
}
}
return a;
}8.2 Given a binary tree, write a function that prints all of the paths from the root node to the leaf nodes. What is the functions run time and space requirement.
8.3 Convert a binary tree into a circular doubly linked list . The order of the elements in the linked list have to be the order of elements you get when you do an in order traversal of the binary tree.
8.4 Given a binary tree, write a function to find the length of the longest path in the tree.
/**
* Complexity
* T(n) = T(n/2) + T(n/2) + 1
* 2^(log_2(n) + T(1) + sumation )
* O(n)
*/
int getMaxDepth(TreeNode *¤tRoot){
if(currentRoot == NULL)
return 0;
int left = getMaxDepth(currentRoot->left);
int right = getMaxDepth(currentRoot->right);
return max(left,right) + 1;
}8.5 Write a function to check that a binary tree is a valid binary search tree.
bool isValid(TreeNode *¤tRoot){
if(currentRoot == NULL){
return true;
}
if(currentRoot->left != NULL){
if(currentRoot->value < currentRoot->left->value){
return false;
}
}
if(currentRoot->right != NULL){
if(currentRoot->value > currentRoot->right->value){
return false;
}
}
bool left = isValid(currentRoot->left);
bool right = isValid(currentRoot->right);
if(left == false || right == false){
return false;
}
return true;
}- Quick about hash in Python
- Duplicate key List
- Consider each key will hold a list of value.
- or consider defaultdict python class
from collections import defaultdict
- ex:
>>> D[key] = []
>>> D[key].append(val)- init: `optimizeTable = [[0 for i in range(col)]for j in range(row)]`- Introduce yourself.
- My name is dat ng. junior. major in ce.
- over the past, attend many competition where I use Google product as synchronize workplace.
- ex: last hackathon, we build a violence detector, where we use google virtual machine to train our machine learning model.
- currenlty, city sim
ulation project, team have 3 peoples. take advantage of google products to help boost our working efficency.
- As a person who interest in tech fields, I have this Goal of sharing my work techninque software that I know to help other.