Jan 20, 2021

- Given an array of numbers, write a program such that:
- Move even numbers to the left of the array
- Move odd numbers to the right of the array

__Example__:

- Inputs: a[] = [5,8,7,2,6,1,9,4,3,10]
- Expected Output: [10,8,2,4,6,1,7,9,3,5]

- Understand the problem
- Brainstorm Possible Scenarios
- Brainstorm Possible Approaches
- Write Code for a selected approach
- Write Tests
- Walkthrough

__Ask questions____:__

- Is additional data structure allowed?
- Should the original sequence of numbers should be maintained?
- Are duplicate values are allowed in the array?

__Document the Problem:__

- Given an array of numbers, move even numbers to the left and odd numbers to the right
- No additional data structures allowed, needs to be done in-place
- No Original sequence of numbers doesn’t have to be maintained
- Duplicate values are possible in the array

__Scenarios__

- Happy Case
- Input: a[] = [5,8,2,4,6,1,9,3,10]
- Expected output...

Jan 11, 2021

- You are given 2 inputs: an array of numbers and a number
- Let’s call the input array as
**a[]**and input number as**target** - Write a program to check if 2 elements exist in
**a[]**such that their sum add up to**target** - For example, if the input array is
**[4,5,1,3,2,7,9]**and target value is 16, the program should return**true**, since 7 and 9 sum up to be 16

I like to follow the following process / framework when I do interviews

- Understand the problem
- Brainstorm Possible Scenarios
- Brainstorm Possible Approaches
- Write Code for a selected approach
- Write Tests
- Walkthrough

I'm finishing last few iterations on my courses. Sign up below to be notified when they're released.