I firmly believe that technical assessments are a critical part of the interview process. It allows us to “put all our cards on the table” early on; being efficient with both the candidate and the employer’s time. However, it was a difficult realization when I discovered that technical assessments are not just “build me X, Y or Z of a website”; something that I have been acutely focused on for 15 weeks during the full stack bootcamp. Instead, I have to leverage this general knowledge in order to apply it to more algorithmic problems.
Writing candidly, during this roller coaster of a time that is the job search, I have completed a few coding challenges that have hurt my self confidence and left me wondering if companies truly intend on hiring more junior staff. To continue my development as a budding software engineer and increase the likelihood of passing future exams, I have identified key algorithms to be familiar with; some of which include:
1. Binary Search
This algorithm is meant to find things like an item in an array. The easiest implementation is by using recursion. It is important to note that the input must be sorted.
2. Linear Search
This algorithm searches through all elements in an array using a loop, or recursion, and compares each element with the one you want to search for.
3. Quick Sort
Quick sort performs comparisons, meaning that it can sort items of any type regarding a “less-than” relation is defined.
4. Counting Sort
This algorithm sorts an array from minimum to maximum values.
5. String Reversal
A palindrome is a word/phrase that reads the same backwards as forwards.
/[\W_]/g was necessary to add as we want our function to look over (and remove) any non-word or _ characters (including space, symbols, & integers). Notice “e_l 6l‘’%e” still evaluates to true as “elle” did.
- The / represents to beginning and end of a regular expression
- [ ] signifies the start and end of a character set
- \W denotes “non-word” characters (opposed to \w that will match a word)
- _ is the _ character
- The g means that this is a global search
7. Integer Reversal
8. Fizz Buzz
Given a number, print out every integer from 1 to that number. When the integer is divisible by 2 print “Fizz,” when the integer is divisible by 3 print “Buzz,” and when the integer is divisible by both 2 and 3, print “Fizz Buzz.”
9. Max Character
Given a string, return the character that appears most often. The trick is to create a table (hash) to record the “tallies” for each time a character is looped through. The table’s key is the character and the value is the counter (e.g., m: 1).
Anagrams are words/phrases that are rearranged/contain the same characters. Note: The approach highlighted below is probably the most efficient way. However, you can also use a hash map like we for max character (counting the number of characters in each string and seeing if they’re equal to each other).
Given a string, count the number of vowels.
12. Array Chunking
Splitting an array into smaller arrays of a specified size.
13. Array Reversal