Personal Brand — Week Four

Me as an interviewer

Preparing my coding interview

Executing the interview

  1. Understanding the Prompt. With this I wanted to qualify how good is the interviewee understanding a new problem.
  2. Designing a Solution. Before coding, I ask the interviewee to plan her solution, she told me her ideas and how she could solve the problem, this was helpful to me to evaluate this category.
  3. Implementing a Solution. And here we jump to coding, here I focused more on how good was the code of the interviewee in terms of good practices, if it was easy to read (use of tabulations and a consistent format) and if the solutions passed all the tests cases, besides other things.
  4. Communication. This was evaluated the entire interview, here I checked how the interviewee communicated her ideas, her attitude and if she maintained a positive tone.
  • Simple Approach: Consider all subarrays one by one and check the sum of every subarray. Run two loops: the outer loop picks a starting point I and the inner loop tries all subarrays starting from i, time complexity is O(n²).
  • Efficient Approach: If a subarray has sum greater than the given sum then there is no possibility that adding elements to the current subarray the sum will be x (given sum). Start with an empty subarray, add elements to the subarray until the sum is less than x. If the sum is greater than x, remove elements from the start of the current subarray, time complexity is O(n).

--

--

Software Engineer, responsible, friendly and self-taught, with hungry to learn new things.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Iván Alberto Aguilar Castillo

Software Engineer, responsible, friendly and self-taught, with hungry to learn new things.