Interview Challenges

Last Updated on January 27, 2022

I am in the process of interviewing and wanted to document all the code challenges I am confronted with.


For every repeating letter in a string, add a “*” between them.
https://codepen.io/peterdillon/pen/adwyLw


Check if a given number is a power of 2:
https://codepen.io/peterdillon/pen/GoEvaa/


Presented with a photoshop design I was asked to code this in 20 minutes, making sure the bottom 3 elements were coded in flex-box:

What does jQuery .delegate do? How is it the same or different than .on? What does .off do? What is bubbling?
https://codepen.io/peterdillon/pen/jWGwKz/

How does css animation and transition work?
http://codepen.io/peterdillon/pen/dGVWqw/

Photoshop Challenge:
I was asked to grab a layer with a drop shadow effect on it from within a full page layout design document and export it as a png with transparency and effect included.


  1. Right click on desired layer and choose “Duplicate Layer”
  2. In dialog “Destination” choose ‘New”
  3. This gives you a new document the same height and width as the original with your new layer in it’s respective place
  4. Choose menu “Image > Trim” (There are many options when trimming but for this purpose the default meets the requirement)
  5. To save as, you have two choices, the classic “Ctrl+Alt+Shift+S” to open the “Save For Web” dialog or you can Right click layer and choose “Quick Export As PNG”
  6. Compression varies – on small simple graphic QE was more compressed – on large colorful file – SFW was smaller.