[algogeeks] A Coding Problem

2012-07-14 Thread Gobind Kumar Hembram
Please visit this linkhttp://www.techgig.com/codehire/ZSAssociates/problem/35.And help me in solving this. -- Thanks Regards Gobind Kumar Hembram Contact no.-+91867450 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

[algogeeks] Question asked in Amazon Online Test

2012-06-29 Thread Gobind Kumar Hembram
Given an integer expression in a prefix format (i.e. the operator precedes the number it is operating on) , print the expression in the post fix format . Example: If the integer expression is in the prefix format is *+56-78, the postfix format expression is 56+78-*. Both of these correspond to

[algogeeks] Question asked in Tachyon interview

2012-06-27 Thread Gobind Kumar Hembram
Write C code to implement level order traversal of a tree. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] Question asked in Tachyon interview

2012-06-26 Thread Gobind Kumar Hembram
How to multiply two numbers without using * operator? Hint:Use bit operators -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] Question asked in Amazon online test

2012-06-23 Thread Gobind Kumar Hembram
Given an array containing sequence of bits (0 or 1), you have to sort this array in the ascending order i.e. all 0' in first part of array followed by all 1's. The constraints is that you can swap only the adjacent elements in the array. Find the minimum number of swaps required to sort the

Re: [algogeeks] Question asked in Amazon online test

2012-06-23 Thread Gobind Kumar Hembram
If we use merge sort like procedure,ans will be 1 here it should be 3.we have to swap 0s and 1s linearly. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this

[algogeeks] Question

2012-06-23 Thread Gobind Kumar Hembram
Write a function longest_palindrome, which takes an array of strings as argument and returns the longest palindrome in that array if any.Please give ideas how to implement this function. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

[algogeeks] Programming Question

2012-06-22 Thread Gobind Kumar Hembram
I was asked this question in one company Programming Round.Please help me in solving this,I tried with array of pointers ,2-D array and by buffering. You have a file with names of brands separated by comma. Write a program (in language of your choice) to group them by their starting letter. For

[algogeeks] Question asked in Amazon Online test

2012-06-22 Thread Gobind Kumar Hembram
Given two positions in a 2-D matrix, say (x1, y1) and (x2, y2) where x2=x1 and y2=y1. Find the total number of distinct paths between (x1, y1) and (x2, y2). You can only move in right direction i.e. positive x direction (+1, 0) or in up direction i.e. positive y direction (0, +1) from any given

[algogeeks] Question

2012-06-22 Thread Gobind Kumar Hembram
Given an integer expression in a prefix format (i.e. the operator precedes the number it is operating on) , print the expression in the post fix format . Example: If the integer expression is in the prefix format is *+56-78, the postfix format expression is 56+78-*. Both of these correspond to

[algogeeks] MySql Connector/C

2012-03-22 Thread Gobind Kumar Hembram
Hi Do any one know how to configure MySQL Connector ; so as to connect to MySql using C.If any one have any idea ; please share. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com.

[algogeeks] Google interview question

2010-12-13 Thread GOBIND KUMAR
One of my friends attended google interview.This was one the question asked. you are given N documents(possibly in millions) with words in them. design datastructures such that the following scenarios take optimal time: a. print all the the docs having a given word b. print

[algogeeks] Microsoft interview question

2010-12-10 Thread GOBIND KUMAR
Help me in solving this problem... Define a data struct for the search engine which will represent whether given word is there in the document or not .It should be fast. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] Google questions

2010-12-09 Thread GOBIND KUMAR
Code for question no.--2 #includestdio.h #includeconio.h #includetime.h struct test{ clock_t endwait; void (*print_ptr)(); }; void print() {printf(\nHello World\n);} void wait ( int seconds ) { struct test *g=(struct test *)malloc(sizeof(struct test)); g-endwait= clock

Re: [algogeeks] Largest rectangle in a binary matrix

2010-12-08 Thread GOBIND KUMAR
Hi, Solution is available at http://geeksforgeeks.org/?p=6257 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: Amazon interview Question (Array yet again!)

2010-08-27 Thread GOBIND KUMAR
This code is giving incorrect answer in some inputs.If possible someone correct it. #includestdio.h #includeconio.h static int SIZE=5; void print(int *array); int del(int *array,int i); int decrement(int *array,int i); void print(int *array) { printf(\n); int i=0;

Re: [algogeeks] Re: Adobe Questions

2010-08-20 Thread GOBIND KUMAR
This is the code for question no-4 #includeiostream #includeconio.h using namespace std; int main(){ char str[20]; char *sp=str; int n=0; int count=0;int carry=1; gets(str); //cout\nstr\n; while(*sp!='\0'){ *sp=(*sp=='1')?'0':'1'; sp++; count++; }