Tuesday, November 22, 2016

ATLC Interview

Algorithms: Cracking the Coding Interview
System Design: https://www.hiredintech.com/system-design/ 
Class Design: http://www.hiringlibrary.com/object-oriented-design-interview-for-parking-lot-or-elevator/ 
OOP: http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep

  1. Array of length n, its elements are x-powers of the range (1 to n+1). There is one repeated element, find it.- The interviewer helps you till you reach the final solution, but he keeps asking about time and space complexity of each move you do. He may ask you to implement system functions like pow, sqrt and so on..
  2. Can static functions work on non-static members?
  3. Design a logger class?
  4. What's n-tier applications?  
  5. find first common ancestor in a tree  
  6. optimized sum of array elements divisible by x  
  7. Design chess engine system (no much coding in this one just drawing and design decisions of the system)  
  8. Given an unsorted array of integers in O(n) time complexity. find the first unrepeated element in that array. For example: A = [1 2 3 3 2 1 4 5 6] the answer is 4.  
  9. Given an unsorted array of strings. Count the number of repetitions of each string in that array.  
  10. Given an array of integers. find the element which the sum of elements on its left equals to the sum of elements on its right  
  11. delete an element from a linked list
  12. how to sort 2 different arrays ,and save the result in the second array, if the first contains n elements, and the second contains m elements, and the second is alocated a length of m+n.
  13. if you have a linked list ordered like : n1-n2-n3-n4-n5-n6-n7-NULL. how to sort it to be at the order : n2-n1-n4-n3-n6-n5-n7-NULL 

C++ semaphore https://gist.github.com/lettergram/431198ac7bd9453b98ec

Wednesday, January 13, 2016

Getting Back to Work

Since it has been a while since I worked on anything, I will fix this by working everyday for a small amount of time, and keep incrementing that until 8 hours/day.

1 hour/day (not yet started - in progress - finished on )
2 hours/day (not yet started - in progress - finished on )
3 hours/day (not yet started - in progress - finished on )
4 hours/day (not yet started - in progress - finished on )
5 hours/day (not yet started - in progress - finished on )
6 hours/day (not yet started - in progress - finished on )
7 hours/day (not yet started - in progress - finished on )
8 hours/day (not yet started - in progress - finished on )

Design Interview at Google. ARGHHHHHHHHHH.


Monday, January 4, 2016

Final List (review in the 2 days before the interview)

Data Structures:
Iterator
Smart Pointers
Linked List
Doubly Linked List
Queue
Stack
Deque
Hash Table
Heap
Binary Tree
BST
Red-Black Tree
AVL-Tree
B Tree
Priority Queue
Trie
Union-Find
Skip List
Graph
Bloom Filter
Splay Tree
Suffix Tree
Given a binary tree, make it behave as a list.


General (Design):
Search Suggestion of Google Search Engine

Monday, December 14, 2015

The Revolution is the Wire

http://www.imdb.com/title/tt3488710/


elthawrah heyah el estemraryah, where everyone who believes in it excels in what he does best. I am talking here about cs people and how they can make the revolution work. Movie makers how can they help it, photographers. Everyone.

Saturday, December 12, 2015

Google Interview Preperation

All interviews:
1. yet3araf 3alik, w ye2om raza3lak el process
2. 1st phone interview.
3. 2nd phone interview.
4. el onsite, 5 interviews, 4 ds/algos + 1 sys. design.

aboelkheir problems:
1. el corner cases by2fesho 3aliha.
--- test your code with some testcases
--- how to handle corner cases in an effecient way.
--- use datastructures that make things easier e.g. vectors instead of arrays.
--- think of empty arrays, empty strings, size of input, overflows.
--- codility and leetcode pay great attention to corner cases.
--- adhocs usually has lots of corner cases
--- recrusive style problems like segment trees, BST ... etc
2. getting the path in dp using recursion is not a good idea.
--- solve dp problems about getting the path using iteration.
3. mutation on the trees, insert in a weird location, all ways of traversing trees, balanced binary search trees.
--- implement binary search tree, (red-black tree, splay tree).
--- impelement iterators
--- implement caching
--- make a binary act as a list.
4. getting a good time sleep before the interview, because it is really long.
--- nam koayes w matfsha5sh nafsak elyoum elly 2ablo.
5. system design, be aware of response time, data structures, scalability, how to retrieve info in a db, and how to update the info.
--- read about google file system
--- read about hadoop
--- read about mapreduce
--- read about big tables
--- read about google log system
--- https://github.com/checkcheckzz/system-design-interview
--- http://grouplens.org/blog/preparing-for-a-google-technical-interview/
6. probability preperation - reservoir sampling
--- solve probability problems on topcoder/cf...etc

Tips:
1. Attitude
2. they rely on the interviewers feedback heavily, try to impress all of them.
3. code on the computer in the interview room (in the onsite).
4. take snacks with you to the interview to eat and be energetic.
5. 5alik baya3ha
6.

---
usually tell me about a difficult-situation questions should be answered by how you behaved in order to show how you acted before in such situations.