Category: Grokking 75: Top Coding Interview Questions
-
Grokking 75:H-Index (medium)
Problem Statement Given an integer array citations where citations[i] represents the number of times a researcher’s ith paper has been cited, return the researcher’s h-index. The h-index is defined as the maximum number h such that the researcher has h papers with at least h citations each. Examples Example 1 Example 2 Example 3 Constraints: Solution To solve this problem, we use an array to count the number…
-
Grokking 75:Jump Game II(medium)
Problem Statement You are given an array nums containing n integers, where nums[i] represents the maximum length of a forward jump you can make from index i. You are initially positioned at nums[0]. Return the minimum number of jumps needed to reach from the start to the end of the array. Examples Example 1: Example 2: Example 3: Constraints: Solution To solve this problem, we need to keep track of the…
-
Grokking 75:Jump Game (medium)
Problem Statement You are given an array of integers nums. You start at the first index of the array and each element in nums represents the maximum number of steps you can jump forward from that position. Return true if you can reach the last index, or false otherwise. Examples Example 1 Example 2 Example 3 Constraints: Solution To solve this problem, we will use a greedy…
-
Grokking 75:Zigzag Conversion
Problem Statement Given a string s and a numRows integer representing the number of rows, write the string in a zigzag pattern on the given number of rows and then read it line by line, and return the resultant string. The zigzag pattern means writing characters in a diagonal down-and-up fashion. For example, given the string “HELLOPROGRAMMING” and 4 rows, the pattern would…
-
Grokking 75:Best Time to Buy and Sell Stock
Problem Statement You are given an array prices where prices[i] is the price of a given stock on the day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return…
-
Grokking 75:Roman to Integer (easy)
Problem Statement Given the Roman numeral string s, convert it into its equivalent integer and return it. Roman numerals use combinations of seven symbols: I, V, X, L, C, D, and M, representing values 1, 5, 10, 50, 100, 500, and 1000 respectively. For example, I is equivalent to 1, II is equivalent to 2, and XI is equivalent to 11 (X + I). In some cases, a smaller numeral before a larger numeral indicates subtraction (e.g.,…
-
Grokking 75 – Top Coding Interview
Welcome to Grokking 75 – Top Coding Interview Questions Your ultimate guide to acing coding interviews. This course is designed to help you tackle high-frequency questions that have been asked in top tech companies — including FAANG — over the past 6 to 12 months. If you’re short on time and need to ensure your…