#dsa

Found 31 articles tagged with #dsa

Longest Increasing Subsequence

The problem of finding the longest increasing subsequence of a given array of integers is a classic dynamic programming problem.

Sep 17, 2023#dsa#leetcode

Merge Two Sorted Lists

This is a common problem that tests your understanding of linked lists and basic merging algorithms, involves merging two sorted linked lists into a single sorted linked list.

Rotate Array

The problem is about rotating an array to the right by a given number of steps, modify the given array in-place (without using an extra array) and perform the rotation.

Three Sum

Given an array of numbers, the task is to find all combinations of three numbers from the array such that their sum equals a given target value.

Longest Substring Without Repeating Characters

The goal of this problem is to find the length of the longest substring within a given string that does not contain any repeating characters.

Implement Queue using 2 Stacks

In this approach, you use one stack for enqueue (insertion) operations and the other stack for dequeue (removal) operations, effectively simulating the behavior of a queue.

Learn greedy algorithms with classic problems

It's essential to understand the problem's characteristics and the properties of the Greedy approach to decide whether it is suitable for a specific problem or not.

Commonly methods in amortized analysis

There are generally three methods for amortized analysis: aggregate analysis, accounting method, and potential method. The choice is most convenient for a particular situation.

Jun 14, 2023#dsa#algorithms

Valid Parentheses

You are given a string containing only parentheses, brackets, and curly braces. You need to determine if the string's parentheses are valid and properly balanced.

Solutions of "Two Sum" problem on LeetCode

You need to find two elements in the nums array such that their sum equals target and return their indices as an array.