CSC Interview Question for Software Analysts


Country: India
Interview Type: Written Test




Comment hidden because of low score. Click to expand.
1
of 1 vote

a) O(n^2)
b) O(n)
c) O(n) if no sort order maintained; O(log n) if it is BST or sorted tree
d) O(1)
e) O(n) if it is unsorted; O(log n) if sorted

- JustCoding October 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Why would a Binary Tree have O(1) if no sort order is maintained?

Also, for hash table with collision, it is O(1 + alpha)

And if your alpha is large, then you don't get O(1)

- BigOh October 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

alpha is the load factor - i.e. the ratio of number of elements to be stored and number of slots in the hash table.

- Gaurav October 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

The alpha in a typical hash table implementation is typically O(1), no?

- Anonymous October 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Why would you search for an item using a sorting algorithm? Maybe you misread it and it said "selection algorithm" instead of "selection sort algorithm"

- jobeo October 23, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i guess jobeo is right .. Is it sudha ?

- gndp October 24, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More