All Posts

Leetcode 153: Find Minimum in Rotated Sorted Array

Given a sorted array of unique elements, rotated between 1 and n times, find the minimum element in this array.

Leetcode 155: Min Stack

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

Leetcode 162: Find Peak Element

You are given a list of integers, nums. A peak element is an element that is strictly greater than its neighbors. You need to find and return the index of any peak element in the list. The algorithm should run in O(log n) time.

Leetcode 167: Two Sum II - Input Array Is Sorted

Given a sorted array of integers, find two numbers whose sum equals a target value. Return the indices of these two numbers, ensuring they are 1-indexed.

Leetcode 189: Rotate Array

You are given an integer array nums. Your task is to rotate the array to the right by k steps, where k is a non-negative integer.

Leetcode 198: House Robber

You are a burglar planning to rob houses along a street. Each house has an amount of money, but robbing two adjacent houses will trigger an alarm. Given an integer array nums representing the money stashed in each house, find the maximum amount you can rob without triggering the alarm.