This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package toBeDeleted; | |
import org.jboss.netty.buffer.ChannelBuffer; | |
import org.jboss.netty.channel.Channel; | |
import org.jboss.netty.channel.ChannelHandlerContext; | |
import org.jboss.netty.channel.ExceptionEvent; | |
import org.jboss.netty.channel.MessageEvent; | |
import org.jboss.netty.channel.SimpleChannelHandler; | |
public class ChatServerHandler extends SimpleChannelHandler { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.InetSocketAddress; | |
import java.util.concurrent.Executors; | |
import org.jboss.netty.bootstrap.ServerBootstrap; | |
import org.jboss.netty.channel.ChannelFactory; | |
import org.jboss.netty.channel.ChannelPipeline; | |
import org.jboss.netty.channel.ChannelPipelineFactory; | |
import org.jboss.netty.channel.Channels; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.InetSocketAddress; | |
import java.nio.channels.Channel; | |
import java.util.concurrent.Executor; | |
import java.util.concurrent.Executors; | |
import org.jboss.netty.bootstrap.ClientBootstrap; | |
import org.jboss.netty.channel.ChannelFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//********************************************* | |
//Author: Gaurav Bhardwaj | |
//Function to do binary search on ordered lists | |
//********************************************* | |
#include <iostream> | |
using namespace std; | |
class List | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************************** | |
//Author: Gaurav Bhardwaj | |
//Using recusrion to implement binary search tree traversal operations. | |
//******************************************************************** | |
#include <iostream> | |
using namespace std; | |
//structure to contain a node of type binary tree | |
struct BinaryTreeNode | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************** | |
//Author: Gaurav Bhardwaj | |
//Class to implement binary tree operations | |
//******************************************************** | |
#include <iostream> | |
using namespace std; | |
class BinaryTree | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class DoublyLinkedList | |
{ | |
private: | |
struct node{ | |
int data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstddef> | |
using namespace std; | |
class List{ | |
private: | |
struct node | |
{ | |
int data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//***************************************************** | |
//Author: Gaurav Bhardwaj | |
//Linked list implementation of Queue | |
//***************************************************** | |
#include <iostream> | |
using namespace std; | |
class Queue | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*********************************************************************** | |
//Program to find the maximum element in an list using recursion | |
*********************************************************************** | |
#include <iostream> | |
using namespace std; | |
int largest(int list[],int lowerIndex,int UpperIndex) | |
{ | |
if(lowerIndex==UpperIndex)//base case | |
return lowerIndex; |
OlderNewer