Monthly Archives: April 2013

Binary Matrix Transformation

Given a binary matrix, modify it such that if a cell (i, j) contains 0 then make all the cells of ith row and jth column as 0 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 … Continue reading

Posted in Information Technology | Leave a comment

Check if a binary tree is subtree of another binary tree

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { public class Node { private Node left; private Node right; private int value; public Node(Node left, Node right, int value) { this.left = left; … Continue reading

Posted in Information Technology | Leave a comment

Grouping Anagram Sets

Given a set of words in a dictionary, write a program to group all words which are anagrams of each other in to sets. Example: Input: "bat", "rat", "xyz", "tab", "tar" Output: {rat, tar} {xyz} {bat, tab} using System; using … Continue reading

Posted in Information Technology | Leave a comment

Print all permutations of a specified set of characters for a given length without repetition

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { char[] charArray = { 'a', 'b', 'c', 'd' }; int numberOfSlots = 4; int[] numArray = new int[numberOfSlots]; ArrayList … Continue reading

Posted in Information Technology | Leave a comment

How to get an Aadhaar Card?

http://uidai.gov.in/how-to-enrol-for-aadhaar.html

Posted in Organizations | Leave a comment

Print all permutations of a specified set of characters for a given length when repetition is allowed

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { char[] charArray = { 'a', 'b', 'c', 'd' }; int numberOfSlots = 3; int[] numArray = new int[numberOfSlots]; printString(charArray, numArray, 0); … Continue reading

Posted in Information Technology | Leave a comment

KEA – Keyphrase Extraction Algorithm

https://code.google.com/p/kea-algorithm/downloads/list import kea.main.KEAKeyphraseExtractor; import kea.main.KEAModelBuilder; import kea.stemmers.*; import kea.stopwords.*; public class TestKea { private KEAModelBuilder km; private KEAKeyphraseExtractor ke; private void setOptionsTraining() { km = new KEAModelBuilder(); // A. required arguments (no defaults): // 1. Name of the directory — … Continue reading

Posted in Information Technology | Leave a comment