Srikant Aggarwal
BAN USERI love to do development in C & Jave Core. And wish I could solve all the complex puzzles at Career Cup and CodeChef efficiently. :)
Srikant Aggarwal
C-07/60, Sector-8, Rohini, Delhi-110085
E-Mail: srikant.nsit160@gmail.com; Contact No.: 91-9999506482, 91-1127948318
Seeking challenging assignments in Software Development Domain with an organisation of high repute.
Snapshot
Career records over 3 years of experience in Software Development Domain. Acknowledged for high professional standards, and sensitivity to deliver projects within the committed time & cost parameters. Thorough understanding of the SDLC and expertise in managing IT operations with key focus on optimal utilization of resources. Well versed with Mobile Application, Game & UI Development with good knowledge of OpenGL ES, Android 1.1 SDK/1.5 SDK/2.1 SDK/2.2 SDK, iPhone 3.0 SDK/3.1.2 SDK, and Cocos2D. Worked on various projects and games such as Rendering Engine Development, Kinetic Balls, Pupples, Photos+, 3D Audio Visualizer, 3D File Manager, Planet Footbag Soccer Tutorial, Alien Text Application, Online Personal Vault etc. Conversant with C, C++, Java Core, Objective C, XML and SQL. Proficient with designing as well as delivering presentations to the clients; ability to multi-task, work under tight deadlines and also work with minimal supervision. Creative, conscientious and quickly adaptable individual who sets standards for other employees.
Career Contour
Projects
Dec`10 - Present Aristocrat In-house Casino Games
Slot Machine Games are being developed for Aristocrat adhering to various Jurisdictions.
Tools & Environment: Microsoft Visual Studio 2008, C, IBM Rational ClearQuest, GDB.
Job Role
• Modifying/Porting the existing Aristocrat Casino Games for new Jurisdictions.
• Implementing additional functionalities in games as per the specification documents.
• Studying, analysing and making changes to the game to fix the issues/bugs reported by the CVL team.
• Training & helping new joinee while they adapt to the company’s environment and work culture.
• Adding, modifying the Audio Visual Library used in games development as a part time member of the company’s AVL Team.
Projects
July`10 – Dec`10 WiFi Call Application
The application was being developed to make phone calls over WiFi.
Tools & Environment: Android 2.1 SDK, Java Core, C++, Eclipse 5.0, Windows XP, Source Insight, Perforce.
Job Role
• Training on Android Audio Framework at Samsung HQ, South Korea for a period of three months.
• Modifying the Android Audio Framework as per the requirements of Application Development Team.
May`10 – June`10 3D Gallery
A Gallery for Android developed using OpenGL ES APIs.
Tools & Environment: OpenGL ES, Android 2.1 SDK, Java Core, Eclipse 5.0, Windows XP, Perforce, WinSCP.
Job Role
• Studying, analysing and bug fixing for the 3D Gallery Application.
Projects
Jan`09 3D File Manager
The project for Android designed, implemented and tested by me uses a 3D cube, faces of which displays the files present on the Android sd-card, clicking on the face opens the file and displays its content on the face of the cube.
Mar`09 Planetfootbag Soccer Tutorial
During this project, I designed, implemented and tested an iPhone soccer tutorial for Planetfootbag ( www.planetfootbag.ch ). The tutorial included a slideshow optimized for user interaction.
Apr`09 Alien Text Application
This Android based application, developed for Alien Garb ( www.aliengarb.com ) had a sender and a receiver for Alien Text Messages. I developed the Sender part of the App.
Nov`09 – Dec`09 3D Audio Visualizer
I worked on developing 3D GUI for the AVS which is a tool, being developed for iPhone, largely inspired by the WhiteCap AVS for Desktop and featuring parallel eyed, cross section views.
Nov`09 – Jan`10 Photos+
As a part of this project, I worked with Just4FunApps, to fix some major bugs and implement new features in their application, Photos+, aimed at organizing tagged photo album for the iPhone users.
Jan`10 – Feb `10 2 Player Reactor
The game was being developed for an oDesk client and was inspired by the famous Android game. Fabaceae Engine (A Self Developed Rendering Engine) was used in the development process.
Mar`10 Spunky Chunky
A small funny app developed for Riposte Development, LLC for Android & iPhone platforms.
Feb`10 – April `10 Kinetic Balls
Worked as a contractor for Motion9Studios ( www.motion9studios.com ), in fixing bugs and implementing new features for their iPhone game, Kinetic Balls ( an executive physics toy based on Newton’s Cradle ).
The game now has more than 1,00,000 downloads. Later on the game was developed for Android as well.
Projects
Nov ’08 – Dec`09 Rendering Engine Development
A cross platform graphics/UI engine for delivering next-gen user experience on wireless devices, PC, web and TV.
Tools & Environment: C++, Java Core, OpenGL ES, Linux, Microsoft Visual Studio 2005, Eclipse 3.0, IBM Rational Clearcase, XP, Microsoft Active Sync, Android 1.1 SDK, Windows Mobile 6 PRO SDK, Windows Mobile 6 SDK.
Job Role
• Designing, implementing and testing the controls for rendering engine using OpenGL ES.
• Handling the development and testing GUI Applications such as Media Manager, using Rendering Engine API.
Application developed using the Rendering Engine :
1. May‘09 Media Manager The Media Manager, was aimed at displaying Media Files Audio, Video, Photos in a graphically rich environment with enhanced user experience.
2. Jun`09 - Jul‘09 Stage Application GUI
The Stage Application , was aimed at customizing the usual Android Home screen to facilitate a better user experience. Its GUI was developed using the 3D Rendering Engine.
3. Aug’09 – Oct`09 WiFi Remote GUI The Application WiFi Remote is a nex-gen GUI application, aimed at giving remote functionality to mobiles based on Android, Windows Mobile, Blackberry.
Jul‘08 - Nov‘08 Online Personal Vault
Application is used for listing, uploading and downloading personal information such as contacts, personalized ring tone, mails, photos, videos etc, from mobile, STB and PC.
Tools & Environment: C++, Microsoft Visual Studio 2005, IBM Rational Clearcase, Windows XP, Microsoft Active Sync, Windows Mobile 6 PRO SDK, Windows Mobile 6 SDK.
Job Role
• Designing, implementing as well as testing the middleware application to list, upload and download personal information from/to online personal vault for mobile environment.
Other Projects (Self-Initiative)
Projects
Dec`09 – Apr `10 Fabaceae Engine
The engine development was an attempt to put my learning’s at Verizon Data Services into action. Though the engine developed by me was 2D, it helped me in gaining confidence and proved to be of great help in the development of various games such as Kinetic Balls, Pupples & 2 Player Reactor.
Aug`10 – Sep `10 Pupples
The iPhone, Android game for kids from age 2-5 years, is a game which renders bubbles on the screen as a kid taps. These bubbles can be dragged and responds to gravity. The game was fully designed, developed and tested by me.
Oct`10 Dreidel
The iPhone game is inspired by a traditional fun Jewish game.
Mar`11 – Apr `11 Daily Motivation & Inspiration
The application is a great mood booster application which displays an Inspirational & Motivational quote daily, with added functionality of adding any quote to your Favourites or changing the time at which the application will be launched.
Academic Projects
B.E. Project at NSIT, Delhi
Jan ‘08 - May ’08 Automated Fingerprint Recognition System
The project was done under the guidance of Prof. Khushil Saini and Prof. Anubha Gupta of Department of Computer Science and Engineering. It was aimed at exploring the designing and implementation of algorithm for improving accuracy in minutiae extraction.
Summer Training at VirtualWire Technologies, Delhi
Jun ‘07 - Jul ‘07 Antivirus Software Development
Anti-virus software is popular to prevent from virus attacks which may even lead to corruption or loss of important/ sensitive data from computing device. Project objectives were study types of computer viruses and ways to remove the, implementation of Bratbug virus and development of anti-virus software to remove this virus; it was implemented in using Borland Turbo C in Windows XP Environment.
IT Forte
Programming Languages : C, C++, Java Core, Objective C, XML, SQL, OpenGL ES, Cocos2D.
Compilers : Borland Turbo C.
Debuggers : GDB ( The GNU Project Debugger )
Operating Systems : Windows Mobile 6/6 PRO, Android 1.1/1.5/2.1, iPhone 3.0/3.1.2, Brew, Windows XP, Linux Red Hat, Linux Open Suse.
Developmental Tools : Eclipse 3.0, Eclipse 5.0, IBM Rational Clearcase, IBM Rational Clearquest,
Perforce, WinSCP, Source Insight, XCode 2.0, XCode 3.1.2,
Microsoft Visual Studio 2005, Microsoft Visual Studio 2008.
Courses Completed
Completed courses on : Computer Graphics, Introduction to Programming, Data Structures, Operating Systems,
Computer Algorithms.
Academia
B.E. (Computer Science) from Netaji Subhas Institute of Technology (Formerly Delhi Institute Of Technology), Delhi, India in 2008; Marks Secured- 68.3%.
Personal Dossier
Date of Birth : 30 September 1986
Language known : English & Hindi
Hobbies : Following latest gadgets, social care ( http://foundation.verizon.com/employee/spotlight-spice.shtml ).
Hi,
I have an O(n) algo for this. Please check it. In this, I make inorder traversal and keep on saving the max sum and the corresponding node till now in 2 variables.
int get_max_sum_node(node *root, node **max_sum_node)
{
static int max = 0;
if(root != NULL)
{
int sum = 0;
sum += get_max_sum_node(root -> left, max_sum_node);
sum += root -> data;
sum += get_max_sum_node(root -> right, max_sum_node);
if(sum > max)
{
max = sum;
*max_sum_node = root;
}
return sum;
}
return 0;
}
First answer with each stack element containing and extra field min :
//
// main.c
// MinStack
//
// Created by Srikant Aggarwal on 25/12/11.
// Copyright 2011 NSIT. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
typedef struct stack_element
{
int data;
int min;
struct stack_element *next;
} stack_element;
stack_element *top = NULL;
void push(int data)
{
stack_element *temp = (stack_element *)malloc(sizeof(stack_element));
temp -> data = data;
temp -> next = top;
if(top == NULL)
temp -> min = data;
else
{
if(data <= top -> min)
temp -> min = data;
else
temp -> min = top -> min;
}
top = temp;
}
int pop()
{
int data;
if(top != NULL)
{
data = top -> data;
stack_element *temp = top;
top = top -> next;
free(temp);
temp = NULL;
return data;
}
return -1;
}
int get_min()
{
if(top != NULL)
return top -> min;
return -1;
}
int main (int argc, const char * argv[])
{
int ans = 1;
while(ans == 1)
{
int op, min;
printf("\n1. Push\n2. Pop\n");
scanf("%d", &op);
if(op == 1)
{
int element;
printf("\nPush Element = ");
scanf("%d", &element);
push(element);
if((min = get_min()) != -1)
printf("Min = %d\n", min);
}
else if(op == 2)
{
int element;
if((element = pop()) != -1)
{
printf("\nPopping Element %d", element);
if((min = get_min()) != -1)
printf("\nMin = %d\n", min);
else
printf("\nStack Empty\n");
}
else
printf("\nStack Empty\n");
}
else
printf("\nInvalid operation\n");
printf("\nContinue ? \n1. Yes\n2. No\n");
scanf("%d", &ans);
}
}
My solution (Didnt take time into consideration but can take it into consideration as a part of Vehicle class and calculating it in between the parkVehicle() and releaseVehicle() classes :
public class ParkingLot
{
Vector<ParkingSpace> vacantParkingSpaces = null;
Vector<ParkingSpace> fullParkingSpaces = null;
int parkingSpaceCount = 0;
boolean isFull;
boolean isEmpty;
ParkingSpace findNearestVacant(ParkingType type)
{
Iterator<ParkingSpace> itr = vacantParkingSpaces.iterator();
while(itr.hasNext())
{
ParkingSpace parkingSpace = itr.next();
if(parkingSpace.parkingType == type)
{
return parkingSpace;
}
}
return null;
}
void parkVehicle(ParkingType type, Vehicle vehicle)
{
if(!isFull())
{
ParkingSpace parkingSpace = findNearestVacant(type);
if(parkingSpace != null)
{
parkingSpace.vehicle = vehicle;
parkingSpace.isVacant = false;
vacantParkingSpaces.remove(parkingSpace);
fullParkingSpaces.add(parkingSpace);
if(fullParkingSpaces.size() == parkingSpaceCount)
isFull = true;
isEmpty = false;
}
}
}
void releaseVehicle(Vehicle vehicle)
{
if(!isEmpty())
{
Iterator<ParkingSpace> itr = fullParkingSpaces.iterator();
while(itr.hasNext())
{
ParkingSpace parkingSpace = itr.next();
if(parkingSpace.vehicle.equals(vehicle))
{
fullParkingSpaces.remove(parkingSpace);
vacantParkingSpaces.add(parkingSpace);
parkingSpace.isVacant = true;
parkingSpace.vehicle = null;
if(vacantParkingSpaces.size() == parkingSpaceCount)
isEmpty = true;
isFull = false;
}
}
}
}
boolean isFull()
{
return isFull;
}
boolean isEmpty()
{
return isEmpty;
}
}
public class ParkingSpace
{
boolean isVacant;
Vehicle vehicle;
ParkingType parkingType;
int distance;
}
public class Vehicle
{
int num;
}
public enum ParkingType
{
REGULAR,
HANDICAPPED,
COMPACT,
MAX_PARKING_TYPE,
}
My solution in O(logn) [ Using Predecessor & Sucessor concept ] :
node *find_closest(node *root, int x)
{
static node *pre = NULL, *suc = NULL;
node *result = NULL;
if(root != NULL)
{
if(root -> data > x)
{
if(suc == NULL)
suc = root;
else if(suc -> data > root -> data)
suc = root;
result = find_closest(root -> left, x);
}
else if(root -> data < x)
{
if(pre == NULL)
pre = root;
else if(pre -> data < root -> data)
pre = root;
result = find_closest(root -> right, x);
}
else
result = root;
if(result == NULL)
{
if(pre != NULL && suc != NULL)
{
if((x - pre -> data) < (suc -> data - x))
result = pre;
else
result = suc;
}
else
{
if(pre == NULL)
result = suc;
else
result = pre;
}
}
}
return result;
}
My code :
int no_of_digits(int num)
{
int digit_count = 0;
while(num > 0)
{
digit_count++;
num /= 10;
}
return digit_count;
}
char * i_to_a(int num)
{
char *str;
int digit_count = 0;
if(num < 0)
{
num = -1*num;
digit_count++;
}
digit_count += no_of_digits(num);
str = (char *)malloc(sizeof(char)*(digit_count+1));
str[digit_count] = '\0';
while(num > 0)
{
str[digit_count-1] = num%10 + '0';
num = num/10;
digit_count--;
}
if(digit_count == 1)
str[0] = '-';
return str;
}
My code :
unsigned char is_num_prime(int num)
{
if(num == 1)
return 0;
else if(num >= 2 && num <= 3)
return 1;
else if(num % 2 == 0)
return 0;
else
{
int i = 3;
float fact = ((float)num)/i;
while(fact > 1.0f)
{
if(num % i == 0)
return 0;
i += 2;
fact = ((float)num)/i;
}
}
return 1;
}
We need to insert the element at the end or in between ?
- Srikant Aggarwal December 21, 2011A simple O(n) solution :
int get_position(char str[], char ch)
{
int i, pos = 0;
for(i = 0; str[i] != '\0' && i < MAX_LENGTH-1; i++)
{
if(str[i] == ch)
pos = i+1;
}
return pos;
}
I suppose in this case heap should be min heap.
- Srikant Aggarwal December 13, 2011How does your algo caters to the following expression :
((A*B)+(C*D))
Can you please provide an explanation for your method?
- Srikant Aggarwal December 10, 2011One more method:
//
// main.c
// PrintPermutations
//
// Created by Srikant Aggarwal on 09/12/11.
// Copyright 2011 NSIT. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
void swap(int A[], int index1, int index2)
{
if(index1 != index2)
{
A[index1]=A[index1]^A[index2];
A[index2]=A[index1]^A[index2];
A[index1]=A[index1]^A[index2];
}
}
void reverse(int A[], int begin, int end)
{
int i = 0;
while((begin+i) <= (end+begin)/2)
{
swap(A, begin+i, end-i);
i++;
}
}
void print_permutations(int A[], int n)
{
int i = n-2, j=n-1, k=n-1, l;
unsigned char continue_loop = 1;
for(l=0; l < n; l++)
printf(" %d ", A[l]);
while(continue_loop)
{
i = n-2, j=n-1, k=n-1;
continue_loop = 0;
while(i >= 0)
{
if(A[i] < A[j])
{
while(k > i)
{
if(A[i] < A[k])
{
swap(A, i, k);
reverse(A, j, n-1);
printf("\n");
for(l=0; l < n; l++)
printf(" %d ", A[l]);
break;
}
k--;
}
continue_loop = 1;
break;
}
i--;
j--;
}
}
}
int main (int argc, const char * argv[])
{
int i = 0, n;
int *A;
scanf("%d", &n);
A = (int *)malloc(sizeof(int));
for(; i < n; i++)
A[i] = i+1;
print_permutations(A, n);
}
The solution can be generated by looking at the fact that we have to travel total of m-1 distance to right and n-1 distance downwards. So we have total of m+n-2 steps. Now out of these we need to select the m-1 towards right steps which can be done in m+n-2Cm-1 ways. :)
- Srikant Aggarwal December 08, 2011//
// main.c
// DivisibleBy3
//
// Created by Srikant Aggarwal on 07/12/11.
// Copyright 2011 NSIT. All rights reserved.
//
#include <stdio.h>
int getBits()
{
int bit;
scanf("%d", &bit);
return bit;
}
int main (int argc, const char * argv[])
{
int rem = 0;
int bit;
while(1)
{
bit = getBits();
rem = ((rem << 1) + bit)%3;
if(rem == 0)
printf("\n Divisible by 3 \n");
else
printf("\n Not divisible by 3 \n");
};
}
Ninja's calculations shows the way you need to go with this problem.
The solution to this problem is also provided in the book by Gayle, Cracking The Coding Interview.
Time Complexity = O(n)
Space complexity = NIL (Assuming we can modify original link lists)
Keep 2 ptrs.
One always pointing to digits, another pointing to letters.
1->2->3->4->a->b->c->d->5->6->e->f
Ptr1 -> 1
Ptr2 -> a
Now temp_int = Ptr1 -> next i.e. temp_int -> 3
Ptr1 -> next = Ptr2 i.e. 1 -> a
Ptr1 = temp_int
Now temp_letter = Ptr2 -> next i.e. temp_letter -> b
Ptr2 -> next = Ptr1
Ptr2 = temp_letter
Continue like this.
Howz this :
//
// main.c
// LexPrint
//
// Created by Srikant Aggarwal on 03/12/11.
// Copyright 2011 NSIT. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
void swap(int A[], int index1, int index2)
{
if(index1 != index2)
{
A[index1] = A[index1] + A[index2];
A[index2] = A[index1] - A[index2];
A[index1] = A[index1] - A[index2];
}
}
void recurse_print(int A[], int n, int length)
{
if(length == 1)
{
for(int i = 0; i < n; i++)
printf(" %d", A[i]);
printf("\n");
}
else
{
for(int i = n - length; i < n; i++)
{
swap(A, n-length, i);
recurse_print(A, n, length-1);
swap(A, n-length, i);
}
}
}
int main (int argc, const char * argv[])
{
int *A;
int n;
scanf("%d", &n);
if(n > 0)
{
A = (int *)malloc(sizeof(int)*n);
for(int i = 1; i <= n; i++)
A[i-1] = i;
recurse_print(A, n, 4);
}
return 0;
}
The code implements same thing as done by Anonymous above. :)
- Srikant Aggarwal December 03, 2011The code implements same thing as done by Anonymous above. :)
- Srikant Aggarwal December 03, 2011
- Srikant Aggarwal January 09, 2012