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

https://leetcode.com/problems/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: https://leetcode.com/problems/decode-ways/

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. https://leetcode.com/problems/valid-parentheses/

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

https://leetcode.com/problems/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: https://leetcode.com/problems/min-stack

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: https://leetcode.com/problems/search-in-rotated-sorted-array/

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: https://leetcode.com/problems/reverse-linked-list/ and https://leetcode.com/problems/rotate-list/

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

Given…


From Leetcode excersice https://leetcode.com/problems/projection-area-of-3d-shapes/

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"

Solution:

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