Sunday, 6 December 2015

Encoder Android Application


Get It On Google Play: https://play.google.com/store/apps/details?id=com.grk.encoder

Text Encoder, This application is used to encode the message and convert the message into non readable format.
It can be further decoded to readable format by using the same application.
Instructions To Use:
1) Copy any text from any applications
2) Open Encoder app the copied content will automatically appear in the text box.(If the copied text does not appear in the text box then delete the text in it and paste the copied text).
3) Click encode to change the readable text into non - readable format.
4) Click copy button to copy to clipboard.
5) Now you can send this to anyone or can save it in your mobile the message will be kept safe.

To Decode:
1) Copy the encrypted text
2) Open Encoder app the copied content will automatically appear in the text box.(If the copied text does not appear in the text box then delete the text in it and paste the copied text).
3) Click Decode to change the encrypted text into readable text.


Features:
Encode Text into secret code.
The Encoded messages can be decoded by this application.
Clipboard is automatically copied into the application.
Encoded text can be copied from the application.
Easy to use. Simple user interface.

Updates:
~~Version 2.0~~
Added feature to clear the text.
Added feature to paste from clipboard.
Reduced APK file size.
Optimized memory usage.

~~Version 2.2~~
Added Background Texture

For user requests and suggestions to improve the application

Contact Us:

Blog: http://gokulrajkumar.blogspot.in/

Facebook Page: https://www.facebook.com/grkweb

Application Designed and Developed by Gokul raj kumar
Application icon and promotional banner designed by Balasubramanian


~~~ Special thanks to ~~~
Antony James Cammeron
Balasubramanian

Sunday, 11 October 2015

Wednesday, 23 September 2015

Hackerrank Insert a node into a sorted doubly linked list Solution

Problem Statement

You’re given the pointer to the head node of a sorted doubly linked list and an integer to insert into the list. Create a node and insert it into the appropriate position in the list. The head node might be NULL to indicate that the list is empty.

Source Code:

 Node* SortedInsert(Node *head,int data)  
 {  
   // Complete this function  
   // Do not write the main method.   
   Node *temp = new Node;  
   temp->data = data;  
   temp->next = NULL;  
   temp->prev = NULL;  
   if(head == NULL){  
     head = temp;  
   }else{  
     Node *temp1 = temp;  
     temp->next = head;  
     head = temp;  
     while(temp!= NULL){  
       temp1 = temp;  
       temp = temp->next;  
       if(temp!=NULL){  
         if(temp1->data>temp->data){  
           int tdata;  
           tdata = temp1->data;  
           temp1->data = temp->data;  
           temp->data = tdata;  
         }  
       }  
     }  
   }  
   return head;  
 }  

** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)

Thursday, 6 August 2015

GRK Web

We are a passionate Computer Science Engineering Students who believe in our dreams.
We are application Developers who develop awesome applications for PC and Mobile platforms. 
We build the Future Today.
Our Official website : grkweb.com
Facebook Page : facebook.com/grkweb

Wednesday, 5 August 2015

C++ Diamond Pattern

C++ program to print the diamond pattern using '#' symbols. In this program two for loops are used to print the pattern. The first loop prints the upper part to the diamond ( triangle part ). The second for loop prints the lower part of the diamond (an inverted triangle ) . By combining both of the triangles an diamond pattern structure is formed.

PROGRAM CODE:

 #include<iostream>  
 using namespace std;  
  int main()  
  {  
    int i,j,k=1,s=6,l;  
    for(i=0;i<5;i++,k-=2,s-=1)  
    {  
      for(l=s-1;l>=0;l--)  
      cout<<' ';  
      for(j=k;j<0;j++)  
        cout<<"#";  
      cout<<endl;  
   }  
 k = 9;  
 s = 0;  
 for(i=0;i<5;i++,k-=2,s+=1)  
    {  
      for(l=s;l>=0;l--)  
      cout<<' ';  
      for(j=k;j>0;j--)  
         cout<<"#";  
      cout<<endl;  
    }  
  return 0;  
  }  

OUTPUT:

           #
        # # #
     # # # # #
   # # # # # # #
# # # # # # # # #
   # # # # # # #
      # # # # #
        # # #
          # 

** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)

Saturday, 18 April 2015

Hackerrank Print the elements of a linked list solution

Problem Statement


This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson.

If you’re new to working with linked lists, this is a great exercise to get familiar with them. You’re given the pointer to the head node of a linked list and you need to print all its elements in order, one element per line. The head pointer may be null, i.e., it may be an empty list. In that case, don’t print anything!

Source code:

 /*  
  Print elements of a linked list on console   
  head pointer input could be NULL as well for empty list  
  Node is defined as   
  struct Node  
  {  
    int data;  
    struct Node *next;  
  }  
 */  
 void Print(Node *head)  
 {  
  // This is a "method-only" submission.   
  // You only need to complete this method.   
   while(head!=NULL){  
     cout<<head->data<<endl;  
     head = head->next;  
   }  
 }  

** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)

Hackerrank Print in Reverse solution

Problem Statement

This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson.

You’re given the pointer to the head node of a linked list and you need to print all its elements in reverse order from tail to head, one element per line. The head pointer may be null meaning that the list is empty - in that case, don’t print anything!

Soruce code:

 /*  
  Print elements of a linked list in reverse order as standard output  
  head pointer could be NULL as well for empty list  
  Node is defined as   
  struct Node  
  {  
    int data;  
    struct Node *next;  
  }  
 */  
 void ReversePrint(Node *head)  
 {  
  // This is a "method-only" submission.   
  // You only need to complete this method.   
   int a[100],i=0;  
   while(head!=NULL){  
     a[i] = head->data;  
     i++;  
     head = head->next;  
   }  
   for(int j = i-1;j>=0;j--){  
     cout<<a[j]<<endl;  
   }  
 }  
** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)

Hackerrank Reverse a doubly linked list solution

Problem Statement

This challenge is part of a tutorial track by MyCodeSchool

You’re given the pointer to the head node of a doubly linked list. Reverse the order of the nodes in the list. The head node might be NULL to indicate that the list is empty.

Source Code:

 /*  
   Reverse a doubly linked list, input list may also be empty  
   Node is defined as  
   struct Node  
   {  
    int data;  
    Node *next;  
    Node *prev;  
   }  
 */  
 Node* Reverse(Node* head)  
 {  
   Node *cur = head,*temp = new Node;  
   // Complete this function  
   // Do not write the main method.   
   while(cur !=NULL){  
     temp->next = cur->next;  
     temp->prev = cur->prev;  
     cur->next = temp->prev;  
     cur->prev = temp->next;  
     cur = temp->next;  
     if(cur!=NULL){  
       head = cur;  
     }  
   }  
   return head;  
 }  
** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)

Hackerrank Merge two sorted linked lists solution

Problem Statement


This challenge is part of a tutorial track by MyCodeSchool

You’re given the pointer to the head nodes of two sorted linked lists. The data in both lists will be sorted in ascending order. Change the next pointers to obtain a single, merged linked list which also has data in ascending order. Either head pointer given may be null meaning that the corresponding list is empty.

Source code:

 /*  
  Merge two sorted lists A and B as one linked list  
  Node is defined as   
  struct Node  
  {  
    int data;  
    struct Node *next;  
  }  
 */  
 Node* MergeLists(Node *headA, Node* headB)  
 {  
  // This is a "method-only" submission.   
  // You only need to complete this method   
   Node *head=NULL, *cur,*prev = NULL;  
   Node *curA,*curB;  
   head = headA;  
   cur = head;  
   curB = headB;  
   while(curB !=NULL){  
     if(cur== NULL){  
       head = headB;  
       break;  
     }else{    if(cur->data > curB->data){  
       curA = curB;  
       curB = curB->next;  
       curA->next = cur;  
       if(prev == NULL){  
         head = curA;  
       }else{  
         prev->next = curA;  
       }  
       prev = cur;  
       cur = cur->next;  
     }else{  
       if(cur->next !=NULL){  
         prev = cur;  
         cur = cur->next;  
       }else{  
         cur->next = curB;  
         break;  
       }  
     }}  
   }return head;  
 }  
** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)


Hackerrank Reverse a linked list solution

Problem Statement

This challenge is part of a tutorial track by MyCodeSchool and is accompanied by a video lesson.

You’re given the pointer to the head node of a linked list. Change the next pointers of the nodes so that their order is reversed. The head pointer given may be null meaning that the initial list is empty.

source code:

 /*  
  Reverse a linked list and return pointer to the head  
  The input list will have at least one element   
  Node is defined as   
  struct Node  
  {  
    int data;  
    struct Node *next;  
  }  
 */  
 Node* Reverse(Node *head)  
 {  
  // Complete this method  
   Node *prev = NULL;  
   Node *cur = head;  
   Node *next ;  
   while(cur!=NULL){  
     next = cur->next;  
     cur->next = prev;  
     prev = cur;  
     cur = next;  
   }  
   head = prev;  
   return head;  
 }  
** The above solution is my own code and it may not be the optimal solution or optimal way to approach the problem but it passes all the testcases in Hackerrank. So if you have any optimal approaches feel free to paste the code as the comment below..... :) :) :)