# Thoughts on Odisha!

When I met people outside Odisha mostly in north India, believe me, most of them don’t know where exactly Odisha is. They will simply say “ somewhere beside West Bengal”. They are even confused between Odissi & odia . They think Odissi is our mother tongue.

So here are some…

# Solving Coding Problem: Best Time to Buy and Sell Stock

Given an array of integers where the ith integer represents the price of the stock on day i, return the largest possible profit from completing one transaction (i.e. buying 1 share and selling 1 share).
Examples: Given the following prices…

`// Buy on day 1 and sell on day 5…`

# INTERNSHIP PROJECT

Hackerrank, 2019.

My friend was drawing on the board while I looked on. We were in different teams, each assigned a project. His program currently took 5 hours to execute. The requirement stated one hour. As the ‘algorithm enthusiast’, I was called for help.

The program was to find the…

# Solution: Find the center of the maze

A man starts from the north-west (top-left) corner of the land and begins walking towards the center of it, in a spiral manner. As the man moves, he keeps track of the number of trees growing on each block of land and records the counts on his journal until he…

# Solution: Two Sum

## You’re given an array of integers. Write a function that returns a pair of numbers such that they sum up to zero.

You can assume there will be exactly 1 solution. Each element in the array can only be used once.

Example:

`Array of integers is [2, 7, 9, -2].The pair that sums up to 0 is (2, -2).`

Input:
A list of numbers, separated by space.

`2 7 9 -2`

# Solution: Pluses and Minuses Coding Problem

You’re given a list of integers and a sum, S.

For example:

`Array: 1 5 3 4 3S: 8`

Insert, in front of each number, 1 of the 2 symbols, `+` or `-`, so that the resulting sum adds up to S.

# Solution: Letter Combinations on Phone’s Keypad

## Problem Statement:

In older phones, the keypads are used to type both numbers and letters, as follows:

# Solution: Reverse a Linked List

## You’re given a linked list. Write a function to reverse it.

Example:

`The original linked list is as follows:3 -> 5 -> 2 -> 4The reversed linked list has its arrows changed in direction:3 <- 5 <- 2 <- 4which means4 -> 2 -> 5 -> 3`

# Sort Characters By Frequency-Leetcode Solution & intuition

Question:

Given a string, sort it in decreasing order based on the frequency of characters.

Example 1:

`Input:"tree"Output:"eert"Explanation:'e' appears twice while 'r' and 't' both appear once.So 'e' must appear before both 'r' and 't'. Therefore "eetr" is also a valid answer.`

Example 2:

`…`

## S7rthak

Software Engineer @Vedantu, Former Intern @Hackerrank, GSoC @Wikimedia, Codeforces(Expert)

Get the Medium app