Smita Chopra

Ranch Hand
+ Follow
since Jun 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Smita Chopra

I recently attended an interview with HCL Noida.

They have the rudest HR I have ever met. They would not leave any chance to insult the candidate they were interviewing.
THe guy who interviewed me was extremely short tempered and became angry even when I made some queries.
To quote one instance he asked me how much salary I expected. I asked, if he had a range in mind for me.
He apparently bacame very upset with this and told me "I am asking you a simple question about salary and you are counter questioning me".

Anyways when he asked me at the end of the interview if I had any questions I told him he was very rude and I would not like to work for a company where people like him existed.
I know this is very unprofessional to do so but that is all I could think of at that time.
19 years ago
Is there any other way than using 2 Dimensional Arrays, I find them extremly confusing to use.
Thanks
19 years ago


The problem with this code is that it does a lot of if conditions. If I need to increase it to display hunderds I'll need to add another if condition checking if the number is greater than 99 and less than 1000 ....
Can someone please suggest a better approach in simple words?

(Marilyn removed some code)
[ August 03, 2005: Message edited by: Marilyn de Queiroz ]
19 years ago
Thanks for your replies. This is what I have done so far.


Am I going in the right direction?
How to find if consecutive seats are empty? Check each seat?
Thanks
Thanks
[ August 02, 2005: Message edited by: Smita Chopra ]
19 years ago

Originally posted by SAYED RAFI:
Hi

Thanks to Victor & Smitha : Information sent by you is very usefull to me :
As iam joining Accenture on 8th Aug.2005.

Cheers : Sayed



Congratulations!
Which location are you joining?
19 years ago

Originally posted by Thomas Whalen:

If personA asks for tickets, then
...Ask personA for number of tickets being requested
...Get number of tickets
...If number of tickets is greater than five then
......Reject ticket request
...Else
......Loop through each row
.........If number of available seats is >= than request then
............Fill seats in that row equal to request
...............Set number of seats available minus request
.........End If
......End Loop
...End If
End If

Am I understanding the problem correctly?



Thanks for you input.

But what if second..third...tenth person comes and asks for a ticket. You'll have to see which all seats have been filled. Of the vacant seats you'll have to look for consecutive seats. If consecutive seats are not available you'll have to assign them dispersed seats and update your list of filled seats.
Thanks
19 years ago
Thanks for replying

Originally posted by Thomas Whalen:
I'm only a mere beginner, but...why are you getting questions in a job interview (I thought only highly qualified Java programmers got interviews anymore) and asking them in a beginner forum? :-)


That is becaue I am a beginner myself. Graduated 15 days ago.
19 years ago
Recently in an interview I was asked to write code in Java for the following problem.


In a train compartment there are 67 seats...13 rows of 5 (3 by2) seats
and the last row has 2 sets. A person cannot book more than 5 seats. If a
person is booking then it should be such that maximum people of the group get
consecutive seats.



I can't develop logic for this and which datastructure should I use to store seats which have been assigned and still empty.
Please give me pointers in this regard.
Thanks
19 years ago

Originally posted by Steve Morrow:
First link from Google:

http://www.rgagnon.com/javadetails/java-0426.html



THanks a lot.
19 years ago
How can I convert numeric to words. Say if the user supplies 465 convert it to four hundred and fifty six, convert 34 to thirty four and so on.
Please give me some pointers in this regard.

Thanks.
19 years ago

Originally posted by Joel McNary:
Perhaps the String.replaceAll() method is what you want. It takes a regular expression and replaces all occurrances of the regular expression with the substitute value.



This replaces all occuranecs of @, %, ., and * with the empty string, thereby eliminating them from your string.

Your way could work, albeit much less efficiently, with simply elimating the characters instead of replacing them with a dollar sign, akin to:



Thanks a lot. It was much easier than I thought
19 years ago
I have a method which accepts a String and after eliminating some unnecessary characters like @,* etc it returns the String.

I have not been able to totally eliminate the not allowed characters, but have managed to replace them with a $ sign.
Can someone please tell me how to eliminate the uneeded characters.


[ July 29, 2005: Message edited by: Smita Chopra ]
19 years ago
Thanks a lot for the information.
19 years ago
What are the data structures in Java?
Thanks
19 years ago
Thanks a lot, that was great.
19 years ago