├── LICENSE
└── README.md
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Mostafa El-Marzouki
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Software-Engineer-Interview-QA
2 | A number of Software Engineer interview questions and answers
3 |
4 | ## Table of Contents
5 |
6 | 1. [General Questions](#general)
7 | 1. [Architecture](#architecture)
8 | 1. [Problem Solving](#problemsolving)
9 |
10 | #### [[1]](#topic) General Questions:
11 | + What is polymorphism?
12 | + What is encapsulation?
13 | + What is inversion of control?
14 |
15 | #### [[2]](#topic) Architecture:
16 | + Design principles:
17 | - Separation of concerns.
18 | - Single Responsibility principle.
19 | - Principle of Least Knowledge.
20 | - DRY: Don’t repeat yourself.
21 | - Minimize upfront design.
22 | + Drawbacks of not using `separation of concerns`.
23 | + Microservices is a variant of the service-oriented architecture (SOA).
24 | + What is SOLID Principles of Object Oriented and Agile Design?
25 | - Single responsibility principle.
26 | - Open/closed principle.
27 | - Liskov substitution principle.
28 | - Interface segregation principle.
29 | - Dependency inversion principle.
30 | + Design patterns.
31 | - Creational: Builder, Object Pool, Factory Method, Signleton, Multiton, Prototype, Abstract Factory.
32 | - Structural: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy.
33 | - Behavioral: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento,
34 | Observer, State, Strategy.
35 | + 3-tier architecture?
36 | - Presentation tier.
37 | - Application tier.
38 | - Data tier.
39 | + 3-layer architecture?
40 | - DAO (Repository).
41 | - Business (Service) layer.
42 | - Controller).
43 | + What is REST?
44 | + Idempotent operation EX: The PUT and DELETE methods are referred to as idempotent,
45 | meaning that the operation will produce the same result no matter how many times it is repeated.
46 | + nullipotent operation EX: GET method is a safe method (or nullipotent),
47 | meaning that calling it produces no side-effects.
48 | #### [[3]](#topic) Problem Solving:
49 | + (medium) given a collection of numbers and a sum , find a matching pair that is equal to the sum
50 | - assume the numbers is sorted
51 | - assume the numbers is not sorted
52 | what is the best complexity you can come up with?
53 | can you do it in O(n^2) , O(nlog(n)) , O(n) , etc... ? where n is the length of the numbers
54 |
55 | example : [1 , 2 , 3 ,6] , Sum = 10 , no matching pair
56 | : [1 , 2 , 4 , 4] , Sum = 8 , matching pair = (4, 4)
57 |
58 | + (Easy) given a string , find the first recurret charter in the string
59 | example : 'ABCDA' , answer = 'A'
60 | : 'ABCBDA' , answer = 'B'
61 | : 'ABC' , answer = NULL
62 | find the O(n) answer
--------------------------------------------------------------------------------