Monthly Archives: February 2010

Rectangle Check for Given Coordinates

using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions;   namespace ConsoleApplication1 {     public class Point     {         public int x;         public int y;     }     class Program     {         static void Main(string[] args)         { … Continue reading

Posted in Information Technology | Leave a comment

Pizza Cutting

When someone calls Ivan lazy, he claims that it is his intelligence that helps him to be so. If his intelligence allows him to do something at less physical effort, why should he exert more? He also claims that he … Continue reading

Posted in Mathematics | Leave a comment

Queue Implementation Using Array

using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication2 {     class Program     {         public class ArrayQueue         {               protected object[] data;             protected int start, end;               public ArrayQueue(int capacity)             { … Continue reading

Posted in Information Technology | Leave a comment

Stack Implementation Using Array

using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication2 {     class Program     {         public class ArrayStack         {             protected object[] data;             protected int pointer;             public ArrayStack(int capacity)             {                 data = … Continue reading

Posted in Information Technology | Leave a comment

Same Character Pattern Count

using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication2 {     class Program     {         static void Main(string[] args)         {             string testString = "aabbbaabbbccdd aaabbbccdd aa a";             List<string> list = new List<string>();             string … Continue reading

Posted in Information Technology | Leave a comment

Getting distinct values from arrays

using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication2 {     class Program     {         static void Main(string[] args)         {             int[] integerArray = { 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 }; … Continue reading

Posted in Information Technology | Leave a comment

Simple Encryption and Decryption

using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string str = "Njdsptpgu jt Hsfbu";             int key = 1;             Console.WriteLine("Actual String: " … Continue reading

Posted in Information Technology | Leave a comment