Syed Ali Hassan's repositories
3SumClosestToTarget
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target.
AllPathsFromRootToLeave
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
AS3-PongGame
2D Pong game
ClosestVegetarianRestaurants
Given an array representing the locations of N vegetarian restaurants in the city
Construct-Quad-Tree
We want to use quad trees to store an N x N boolean grid. Each cell in the grid can only be true or false.
CountPaths_DynamicProgramming
You are given a grid of cells with size N rows by M columns. A robot is situated at the bottom-left cell. Task is to reach top right.
DecryptMessage
Encrypted messages consist of lowercase latin letters only, and every word is encrypted separately as follows
DynamicProgramming-CanSum-HowSum-BestSum
DynamicProgramming-CanSum-HowSum-BestSum
Find_Element_That_Appears-Once
Given an array where every element occurs three times, except one element which occurs only once.
HandlingConcurrentCalls
At Booking.com, our customer service team is an important contributor to customer satisfaction.
Kafka-Twitter-Streaming-API
Connect to the [Twitter Streaming API] and retrieve incoming messages based on keyword in the tweet message
Longest-increasing-subsequence
Computes and print longest increasing sub sequence using dynamic programming
LongestCommonSubsequence
Given two sequences, find the longest subsequence present in both of them.
MakeChange
Total number of ways to make change
MakeChangeUsingMinCoins
You are given an array of coins and an interger k. Return min number of coins to make value k.
MaximumProductOfSubArray
Given an array A[] of n integers, the task is to find a subsequence of size k whose product is maximum among all possible k sized subsequences of given array.
MaximumSumSubArray
Maximum Sum of SubArray
PalindromicSubstring
Palindromic Substrings
PriceScrapper
Scrap prices from grocery retail websites
ReconstructItinerary-TopologicalSort
Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order.
RootOfNumber
Many times, we need to re-implement basic functions without using any standard library functions already implemented.
SearchInRotatedSortedArray
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
Shortest-distance-from-top-left-to-given-point-in-2D-grid
The area is abstracted as a grid. Not all locations are accessible by road. The truck only needs to make a single delivery.
ShortestPathBinaryMatrix-BFS
https://leetcode.com/problems/shortest-path-in-binary-matrix/
Strstr
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
TreeProblems
Tree traversal and other tree related problems
WordCountEngine
Implement a document scanning function wordCountEngine, which receives a string document and returns a list of all unique words in it and their number of occurrences, sorted by the number of occurrences in a descending order.
WordLadder
Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that: