Interview Question Bank
Technical Behaviour
Real-World Examples
Interview Questions
Technical Behaviour
Problem Statement You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. You may assume that you have […]
Problem Statement You are given a 0-indexed 2D integer array grid of size m x n which represents a field. Each cell has one of three values: You are situated in the top-left cell, (0, 0), and you want to travel to the safehouse at the bottom-right cell, (m – 1, n – 1). Every minute, you may move to an adjacent grass cell. After your move, […]
Problem Statement There are a total of numCourses courses you have to take, labeled from 0 to numCourses – 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai. Return true if you can finish all courses. Otherwise, return false. Example 1: Input: numCourses = 2, prerequisites = [[1,0]] Output: true Explanation: There are a […]
Top 10 architecture every engineer should know Architectural Patterns Cloud Native Design Patterns Programming Paradigms Code Cleanliness Please visit https://codeandalgo.com/ for more content.
Interview Question Priority Queues Golang Solution Output
Problem Statement Important Logic Golang Solution Output Visit https: https://codeandalgo.com for more such contents.
Leetcode#200 Problem Statement Given an m x n 2D binary grid grid which represents a map of ‘1’s (land) and ‘0’s (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: grid = [ [“1″,”1″,”1″,”1″,”0”], […]
Problem Statement Leetcode#994 Rotting Oranges You are given an m x n grid where each cell can have one of three values: Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten. Return the minimum number of minutes that must elapse until no cell has a fresh orange. If this is impossible, return -1. Example 1 Input: grid […]
Implementing a Simple Queue in Go: A Step-by-Step Guide When working with data structures in Go, understanding how to implement a basic queue is a crucial skill. A queue operates on a First In, First Out (FIFO) principle, meaning the first element added is the first one to be removed. In this post, we’ll walk […]