Sign in

The next problem is a great example of problems that may be solved by recursion or by DP. Excellent to study for your SW interview

Problem #70. Climbing Stairs

You are climbing a staircase. It takes n steps to reach the top.

Each time you can either climb 1 or 2 steps. In…

The next exercise will help you landing that software interview by using DP.

Problem #62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).

The robot can only move either down or right at any point in…

The next exercise will help you landing that Software interview. Extracted from leetcode:

Problem #91. Decode Ways

A message containing letters from A-Z can be encoded into numbers using the following mapping:

'A' -> "1"
'B' -> "2"
'Z' -> "26"

To decode an encoded message, all the digits must be grouped…

The following leetcode excercise will help you to practice using strings and stacks.

Problem #20. Valid Parentheses

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

An input string is valid if:

  1. Open brackets must be…

The following problem helps you to manage data structures and string manipulation

Problem #71. Simplify Path

Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified canonical path.

In a…

The following leetcode exercise asks the user to implement a min stack. Link:

Problem #155. Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Implement the MinStack class:

  • MinStack() initializes the stack object.
  • void push(val) pushes the element val onto…

The next medium level leetcode exercise provides a good understanding of search algorithms and array operations. Exercise:

Problem #33. Search in Rotated Sorted Array

There is an integer array nums sorted in ascending order (with distinct values).

Prior to being passed to your function, nums is rotated at an…

The next writting will contain my solution for the following leetcode problems: and

These two are fairly simple linked list problems. to handle these type of problem is usually recommended to use a dummy node prev that points your current element.

Problem # 206. Reverse Linked List


From Leetcode excersice

We are solving this problem that covers arrays management and a little bit of mathematics and spatial intelligence.

You are given an n x n grid where we place some 1 x 1 x 1 cubes that are axis-aligned with the x, y, and z axes.

This is a popurri with good practices excercises for SW interviews

709. To Lower Case

Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.

Example 1:

Input: "Hello"
Output: "hello"

Example 2:

Input: "here"
Output: "here"

Example 3:

Input: "LOVELY"
Output: "lovely"


Jesus PF

I am en electronics engineer, graduated from ITESM. Experienced working as functional validation and software development.

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