Tip 1: Practice at least 20 questions from each topic, such as LinkedLists, Graphs, Trees, HashMaps, and all medium data structures.
Tip 2: Try to complete the medium code within 30 minutes.
Tip 3: Prepare in one coding language in which you are most comfortable.
Tip 1: Include projects on your resume.
Tip 2: Never include false information.
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.For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1.Return true if you can finish all courses. Otherwise, return false.
Difference b/w a RESTful API from a SOAP API.?
Can a constructor be static in Java.?
What do you understand by singleton design pattern.?
Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour.Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return.Return the minimum integer k such that she can eat all the bananas within h hours.(Link)
You are playing the Bulls and Cows game with your friend.You write down a secret number and ask your friend to guess what the number is. When your friend makes a guess, you provide a hint with the following info:The number of "bulls", which are digits in the guess that are in the correct position.The number of "cows", which are digits in the guess that are in your secret number but are located in the wrong position. Specifically, the non-bull digits in the guess that could be rearranged such that they become bulls.Given the secret number secret and your friend's guess guess, return the hint for your friend's guess.The hint should be formatted as "xAyB", where x is the number of bulls and y is the number of cows. Note that both secret and guess may contain duplicate digits.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?