L11. Solving Technical Interview Problems.
L11. Solving Technical Interview Problems.
Solving Technical
Interview Problems
1 Revision
1) Can you name top 6 programming languages at the
moment?
Some companies could give you a problem and ask you to create some clarifying questions
as if you are the developer who got this task at their job. Look at the example question:
1) How will the app count the steps? Will it use data from the user’s
mobile phone or get the information from another device (e.g. fitness
bracelet, smartwatch, etc.)?
объявить
присвоить
значение
ввод и вывод
вывести на экран
Most common terminology
переменная variable
объявить
declare
присвоить
значение assign a value
объявить инициализировать
declare
присвоить вернуть
значение assign a value
вызвать
ввод и вывод input and output
цикл, зациклить
вывести на экран display/write
итерировать
Most common terminology
переменная variable рассчитать calculate/compute
Code
example:
Code explanation:
https://www.youtube.com/watch
?v=-1v3D6a_1Dc
WORK IN PAIRS/GROUPS
1. Palindrome checker: Write a function that takes a string as input and returns true if
the string is a palindrome (reads the same forwards and backwards), and false
otherwise.
2. Factorial calculator: Write a function that takes an integer as input and returns the
factorial of that number.
3. String reversal: Write a function that takes a string as input and returns the reverse
of the string without using the reverse() method
4. Fibonacci sequence: Write a function that takes an integer n as input and returns
the nth number in the Fibonacci sequence.
5. Anagram checker: Write a function that takes two strings as input and returns true
if the strings are anagrams (contain the same characters in a different order), and false
otherwise.
Bonus
10 common technical interview problems
6. Binary search: Write a function that takes an array of integers and a target value as
input, and returns the index of the target value in the array using a binary search
algorithm.
7. Bubble sort: Write a function that takes an array of integers as input and sorts the
array using the bubble sort algorithm.
8. Linked list: Implement a linked list data structure with methods for adding and
removing nodes, and for finding a specific node in the list.
9. Prime number checker: Write a function that takes an integer as input and returns
true if the number is prime, and false otherwise.
10. Two sum problem: Write a function that takes an array of integers and a target
sum as input, and returns the indices of two numbers in the array that add up to the
target sum.
Thank you!