June 27, 2020
June 25, 2020
June 24, 2020
Trailer of Aditi Rao Hydari’s Sufiyum Sujatayum released..
Amazon Prime Video today unveiled the trailer for the much-anticipated Malayalam film, Sufiyum Sujatayum, which makes its global premiere exclusively on the service and is the fourth of the seven Indian films in five languages to do so. Directed by Naranipuzha Shanavas, Sufiyum Sujatayum is produced by Vijay Babu under his banner of Friday Film House. Come this July 3, Prime members in India and more than 200 countries and territories worldwide can watch the much-awaited movie in Malayalam.
June 22, 2020
June 19, 2020
June 18, 2020
How to implement Snakes and Ladders using Java?
Let's create a SnakeNLadder.java class. Define constant WINPOINT with value 100. Each player has to start the journey from 0, roll the dice and try to reach WINPOINT.
June 14, 2020
June 11, 2020
Sapient Interview Questions
First Round: Live coding test
1). Asked me to create an employee class with a couple of fields like employee id, date of joining, salary age.
1). Asked me to create an employee class with a couple of fields like employee id, date of joining, salary age.
June 08, 2020
#LeetCode : Power Of Two
Given an integer, write a function to determine if it is a power of two.
Example 1:
Input: 1 Output: true Explanation: 20 = 1
June 07, 2020
#LeetCode : Coin Change 2
You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may assume that you have infinite number of each kind of coin.
Example 1:
Input: amount = 5, coins = [1, 2, 5]
Output: 4
Explanation: there are four ways to make up the amount:
5=5
5=2+2+1
5=2+1+1+1
5=1+1+1+1+1
Example 1:
Input: amount = 5, coins = [1, 2, 5]
Output: 4
Explanation: there are four ways to make up the amount:
5=5
5=2+2+1
5=2+1+1+1
5=1+1+1+1+1
June 06, 2020
#LeetCode :Queue Reconstruction by Height
Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to reconstruct the queue.
Note:
The number of people is less than 1,100.
Example
Input:[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]]
Output:[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]]
Note:
The number of people is less than 1,100.
Example
Input:[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]]
Output:[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]]
June 05, 2020
June 04, 2020
#LeetCode : Reverse String
Write a function that reverses a string. The input string is given as an array of characters char[].
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
You may assume all the characters consist of printable ascii characters.
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
You may assume all the characters consist of printable ascii characters.
June 03, 2020
#LeetCode : Two City Scheduling
There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th person to city B is costs[i][1].
Return the minimum cost to fly every person to a city such that exactly N people arrive in each city.
Example 1:
Input: [[10,20],[30,200],[400,50],[30,20]]
Output: 110
Explanation:
The first person goes to city A for a cost of 10.
The second person goes to city A for a cost of 30.
The third person goes to city B for a cost of 50.
The fourth person goes to city B for a cost of 20.
The total minimum cost is 10 + 30 + 50 + 20 = 110 to have half the people interviewing in each city.
Return the minimum cost to fly every person to a city such that exactly N people arrive in each city.
Example 1:
Input: [[10,20],[30,200],[400,50],[30,20]]
Output: 110
Explanation:
The first person goes to city A for a cost of 10.
The second person goes to city A for a cost of 30.
The third person goes to city B for a cost of 50.
The fourth person goes to city B for a cost of 20.
The total minimum cost is 10 + 30 + 50 + 20 = 110 to have half the people interviewing in each city.
June 02, 2020
Madhuri Dixit Celebrates 25 years of Raja
2nd June 1995 – This was the day when Raja released, and well, history was created!
Director Indra Kumar helmed the cult entertainer which released on 2nd June, which had the powerful combination of Direction by Indra Kumar, Acting duo of 90s queen Madhuri Dixit, Sanjay Kapoor and blockbuster songs!
Produced by Ashok Thakeria and Indra Kumar the film took a massive start all over the country and not only did it recover its money in the first week itself, but the hardcore commercial romantic musical entertainer went on to collect five times its first week numbers, emerging as a bonafide blockbuster!!
Director Indra Kumar helmed the cult entertainer which released on 2nd June, which had the powerful combination of Direction by Indra Kumar, Acting duo of 90s queen Madhuri Dixit, Sanjay Kapoor and blockbuster songs!
Produced by Ashok Thakeria and Indra Kumar the film took a massive start all over the country and not only did it recover its money in the first week itself, but the hardcore commercial romantic musical entertainer went on to collect five times its first week numbers, emerging as a bonafide blockbuster!!
#LeetCode Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.
Example 1:
Input: head = [4,5,1,9], node = 5
Output: [4,1,9]
Explanation: You are given the second node with value 5, the linked list should become 4 -> 1 -> 9 after calling your function.
Example 1:
Input: head = [4,5,1,9], node = 5
Output: [4,1,9]
Explanation: You are given the second node with value 5, the linked list should become 4 -> 1 -> 9 after calling your function.
June 01, 2020
Subscribe to:
Posts (Atom)