In this article, I will share my own strategy for getting started with DSA. I will share exactly how I started with 2 star at CodeChef and practiced to achieve 4 star in just 3 months. I will share aditional tips on how learning dsa will help you excell as a software engineer and help you land your first job!
232. Implement Queue using Stacks
Problem Statement
Implement a first in first out (FIFO) queue using only two stacks.
The implemented queue should support all the functions of a normal
queue (push
, peek
, pop
, and empty
).
Implement the MyQueue
class:
void push(int x)
Pushes element x to the back of the queue.
int pop()
Removes the element from the front of the queue and returns it.
int peek()
Returns the element at the front of the queue.
boolean empty()
Returns true
if the queue is empty, false
otherwise.
1143. Longest Common Subsequence, LeetCode
Problem Statement
Given two strings text1
and text2
, return the length of their longest common subsequence. If there is no common subsequence, return 0
.
A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters.
- For example,
"ace"
is a subsequence of"abcde"
.
A common subsequence of two strings is a subsequence that is common to both strings.
Change SSH Port in Linux CentOS (Oracle Linux 8)
On Linux systems, the default SSH port is 22. There are a few reasons why you might want to change this number. This article will walk you through the process of changing the default ssh port 22 to 8080.
Ethereum Blockchain local environment setup using Ganache and truffle
Setting up your dev environment for Ethereum development takes just a few minutes. In this article you will learn about Deploying and Operating Simple Smart Contract on local blockchain network using Ganache and truffle.