ritwik_pandey
BAN USER
- 0of 0 votes
AnswersA nXn matrix consisting of 0 and 1 only is given. n is always odd. A variable k is also given as input. You have to find the minimum vaue of a function F(x,y) over k contiguous row wise elements such that arr[x][y] is 1 for all k contiguous elements.
- ritwik_pandey in India
F(i,j) for any index (i,j) is (n/2-i)^2 + (n/2-j)^2.| Report Duplicate | Flag | PURGE
Cadence Inc Development Support Engineer Algorithm - 2of 4 votes
AnswersGiven two arrays were digits of one array represent a number,maxmise the number by replacing it with elements of second array.
- ritwik_pandey in United States
eg:
arr={3,1,4,5,6}
rep={1,9,5,2,3}
after replacement
arr={9,5,4,5,6}
one digit of rep can be used to replace only once.| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
Answersthere are N employee sitting in consecutive cubicles , we have to send a few of them to onsite , but each time we send one employee onsite , his cubicle becomes empty , now the other employees from both side of that empty cubicle stops working until they are given a gift .
- ritwik_pandey in India
the gifts are given in both sides of the empty cubicle until we reach the end or found another cubicle ,
Input – number of cubicle , and index numbers of people to be sent
output- min number of gifts needed| Report Duplicate | Flag | PURGE
Accenture Dev Lead - 1of 1 vote
Answers. Given n strings consisting of ‘R’ and ‘B’. Two strings can be only combined if last character of first string and first character of second string are same. Given n strings, you have to output the maximum length possible by combining strings.
- ritwik_pandey in United States
I/P
RBR
BBR
RRR
output : 9| Report Duplicate | Flag | PURGE
Walmart Labs Software Engineer Algorithm - 2of 2 votes
AnswersTwo strings s1 and s2 are given. You have make a new string s3 such that it has both s1 and s2 as one of its subsequences and length of s3 is minimum.
- ritwik_pandey in India
input:
apple pear
output:
applear
7| Report Duplicate | Flag | PURGE
Alcatel Lucent Developer Program Engineer - 0of 0 votes
AnswersTwo numbers A and B are given with same number of digits. A power number of any number is formed by right shift of the given number and it does not contain any leading zeroes and containing same number of digits. Given A and B you have to tell how many such pairs of given number and the power number lie between A and B inclusive.
- ritwik_pandey in United States
power numer of 134 are 413 and 341.
111 has no power number.
101 has 110 only as the power number.
note: brute force approach does not pass all test cases. an optimized approach is required.
input
10 40
output
3
/* 12 21, 13 31, 23 32 */| Report Duplicate | Flag | PURGE
Practo Development Support Engineer - 0of 0 votes
AnswersYou are given a vector of strings. They have some encoded information regarding location of a hostage. You know that each location in encoded message starts with _123 and ends with _dad. You have to find all such unique enocded locations in the text.
- ritwik_pandey in United States
I want to use regex to find the solution to this problem in C++. Can someone provide code for the same.| Report Duplicate | Flag | PURGE
Adobe Data Scientist - 1of 1 vote
AnswersA person has to attend some parties in a given day. Given the starting and ending time of each party and assuming that he can attend next party as soon as the previous one finishes, tell the maximum amount of parties he can attend?
- ritwik_pandey in India
eg.
6
1 4
2 8
5 6
1 9
8 10
3 7
solution :3| Report Duplicate | Flag | PURGE
Coupon Dunia Software Engineer / Developer - 0of 0 votes
AnswersGiven an array of integers you to find the range l,r such that and operation of largest two element in that range is maximum.
- ritwik_pandey in India
For example:
Input
6 1 6
Output
1 3
You have to print lexicographically smallest range.| Report Duplicate | Flag | PURGE
SumoLogic SDE-3 String Manipulation - 0of 0 votes
AnswersGiven a matrix of n*n. Each cell contain 0, 1, -1.
- ritwik_pandey in India
0 denotes there is no diamond but there is a path.
1 denotes there is diamond at that location with a path
-1 denotes that the path is blocked.
Now you have start from 0,0 and reach to last cell & then return back to 0,0 collecting maximum no of diamonds.
While going to last cell you can move only right and down.
While returning back you can move only left and up.| Report Duplicate | Flag | PURGE
SumoLogic SDE-3 Dynamic Programming - 0of 0 votes
AnswersYou are given a library of n words. You have to select any one word and remove a character from it such that it becomes one of the words remaining in the inventory. What is the length of the longest possible chain of these removed steps?
- ritwik_pandey in India
The selected word is discarded and not added to the library.| Report Duplicate | Flag | PURGE
Coupon Dunia SDE-2 - 0of 0 votes
AnswersWrite a function to print unique rows of a matrix.
- ritwik_pandey in India
I am thinking of a 0(n) solution for this (if possible).
I am storing the rows of the matrix in a set of vectors and then printing those rows. Please tell me how to do this and the correct time complexity for that. I am not very good with STL.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Matrix - 0of 0 votes
AnswersOn a screen, there are multiple rectangles drawn, when a user clicks on any point, find the smallest rectangle enclosing this point.
- ritwik_pandey in India
I could not come up with a solution. The end points of rectangles were given and also the the point where the mouse was kept was given.| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 0of 0 votes
AnswerIf 2 employees are travelling and they have a start date and an end date, how many overlaps are possible?
- ritwik_pandey in United States| Report Duplicate | Flag | PURGE
Puzzle - 0of 0 votes
AnswerGiven a mxn grid, each of it’s element be either ‘.’, ‘R’, ‘G’ or ‘B’,
- ritwik_pandey in India
where ‘.’ -> empty, ‘R’ -> Red, ‘G’ -> Green, ‘B’ -> Blue
A Blue strip has width 1 and length greater or equal to one.
A Red strip has length 1 and width greater or equal to one.
If a Red strip and a Blue strip overlaps, the overlapped portion will become ‘G’.
Find the minimum number of strips required to cover the whole grid.
1<= m,n <=100
Input
5 5
..B..
..GRR
..B..
R....
R....
Output
4| Report Duplicate | Flag | PURGE
Flipkart SDE1 General Questions and Comments
Yes. You are right. That was a typo. Sorry for that.
- ritwik_pandey September 17, 2015both numbers of the pair must lie within the range [A,B] that are given as input.
- ritwik_pandey September 01, 2015yes.
example: 100-> 010->001
1250->0125->5012->2501
a number with leading zeroes should be ignored. you have to calculate the number of pairs of original number and power number that lie in the given range.
@zortlord
thank you so much. I understood where I was wrong.
would it make any difference if I first sort the list based on starting time and then on end time if start time is same. then taking the first activity always.
something like this.
int count=0;
int end=arr[1].endt;
for(i=2;i<=n;i++)
{
if(arr[i].start>=end)
{
count++;
end=arr[i].endt;
}
}
return count+1;
will it give correct result? because i gave him this solution and he said that's wrong. I couldn't figured out the test case.
please help
can you please provide working code. I am unable to follow your algo.
- ritwik_pandey August 18, 2015It's not necessary that they are sorted in the way you want.
- ritwik_pandey July 21, 2015can you please suggest a suitable data structure for this.? also time complexity should be as minimum as possible.
- ritwik_pandey July 21, 2015it means that the sequence of elements in the rows must be unique.
- ritwik_pandey July 15, 2015
RepEarned praise for analyzing acne for the government. Earned praised for my work implementing mantra to get desired husband in ...
RepAre you searching the best and strong Mantra to remove black magic. Here the best and the most powerful Astromagic ...
RepJohnMThomaa, Systems Design Engineer at USAA
Managed a small team writing about dust in Minneapolis, MN. Spent high school summers marketing Online vacuum pump sale New ...
RepWhyable is an agile team of Software Specialists with vast experience across multiple languages.We will help you to define ...
RepAugment is a mobile app that lets you and your customers visualize your 3D models in Augmented Reality. If you ...
RepI am Jenae Wilder and I work as a content writer, A writer at day, and a reader at night ...
RepDo you need dua for controlling husband? Contact Guru ji right now. He provides the best and simple dua to ...
RepEdwards IVF Surrogate is one of the best & most successful provider of surrogate services.We provide moral, emotional, ethical and ...
Reprameshdondu15, Analyst at ASAPInfosystemsPvtLtd
My name is Ramesh dondu from India. I burn through 2009 to on words consistently work in Interior planner. I ...
RepPal A Roos is the best early childhood & child development center in Charlotte. We are famous offering full-time, part-time and ...
RepIsotherm is providing quality ceiling insulation and roofing insulation services to homes. We are one of the leading manufacturer company ...
RepMaryHDavis, Employee at ASU
Had a brief career promoting wooden tops in Salisbury, MD. My current pet project is lecturing about human hair in ...
Repinfo@kukooo.in, Reverse Engineering and System Developer at Abs india pvt. ltd.
Enthusiastic about implementing wazifa to make someone love you.Prior to my current job I was short selling action figures ...
RepLove is the spice of everyone’s life. Love adds charm and excitement to the monotonous and boring life. If ...
Replovevashikaranmantrasolution, Data Engineer at ASAPInfosystemsPvtLtd
Are you searching the mantra for your lost love boyfriend? BabaJi will guide you with simple and effective mantra to ...
RepTop Tiers provides latest english premier league articles and news to keep you up to date. Visit our website today ...
RepHire high professional child development center in Charlotte. Pal-A-Roo’s Child Development Center is a family-owned child care facility offering ...
RepDiscover the best preschool for kids Charlotte. Visit Pal-A-Roo’se, one of the trusted early childhood & child development center in ...
RepLooking for the best child development center in Charlotte? Pal A Roos provide summer camp for children Charlotte. Our experienced ...
Repreetaharriet, Applications Developer at Achieve Internet
As a sales clerk, I deal with customers on a daily basis. My work face-to-face assisting customers with finding the ...
RepTerryDBonner, Employee at Electronic Arts
Maintained accurate personal records on maintenance crews and technical records on weekly insulation production.Have years of Installation and servicing ...
RepStonefire Arms manufacture and bring Firearms parts & accessories to the market at reasonable prices. We offer a wide variety of ...
RepJohn Colcomb, Analyst at A9
With more than 20 years of car rental and dealership experience, responsible for developing growth strategies to maximize operational effectiveness ...
RepRocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
RepSherryellis555, Computer Scientist at ASAPInfosystemsPvtLtd
My name is Sherri Ellie Once had a fantasy of testing the market for tar in Georgia, GE. Rehearsed in ...
RepSCREENish employee time tracking software can be used as desktop or mobile app. Once the employee has tracked his working ...
RepHad a brief career donating velcro in Africa. Spent several years training sock monkeys in Pensacola, FL. Gifted in working ...
RepEdwards IVF Surrogate is one of the best & most successful provider of surrogate services.We provide moral, emotional, ethical and ...
RepChristinaDDooley, Tech Lead at Car Rental
Rent the stylish, royal & Luxury Cars in Miami.We have become known worldwide by providing Luxury car rental Miami and ...
Rep
Repkhatri, Employee at Student
Repfesfporyi212, Member Technical Staff
My self Fesfpory. I work in agriculture university in India as a professor. I done PHD in Botany in Punjab ...
RepAlisonjaeger755, Data Engineer at Accolite software
I am work in Telecom line in IDEA company. I am data operator and Engineer in back end in Idea ...
RepHave some experience building shaving cream in Mexico. Prior to my current job I was marketing inflatable dolls in Jacksonville ...
RepRosendoVBarhorst, Employee at US
Enthusiastic about implementing wazifa to make someone love you.Prior to my current job I was short selling action figures ...
RepCrystalday777, Computer Scientist at AMD
My name is Crystal Day; I'm from Sydney, Australia, Get Ex Lost Love Back and I'm a sophomore ...
Repmaccydonal4747, Data Engineer at A9
Hi my sweet companions! My name is Maccy Donal, I conceived in Canada Toronto 1994 and I am unceasingly appreciative ...
RepDaniel Wattss, Cloud Support Associate at A9
Spent 2001-2007 getting to know pogo sticks for no pay. Enthusiastic about researching deodorant in Los Angeles, CA. Prior to ...
I wrote the following code and took n=5 and k=3. But it doesnt work. Can someone help me out please
- ritwik_pandey October 04, 2015