Saturday, 28 April 2018

Virtual Private Network(VPN)

Do you know? when you search any data on internet it is not secure.All activity that you are doing seen by ISP(Internet Service Provide) and they can track you. So in such situation you need to secure your data.There are several way to secure your data on internet VPN is one of them.

Virtual Private Network is a technology that create a safe and secure or encrypt your data on less secure network such as Internet.VPN technology was developed as a way to allow remote users and offices to securely access data ,applications and other resources.

The information transmitted between the two locations via the encrypted tunnel cannot be read by anyone else because the system contains several elements to secure both the company's private network and the outside network through which the remote user connects through.

The first step to security is usually a firewall between the client and the host server, requiring the remote user to establish an authenticated connection with the firewall. Encryption is also an important component of a secure VPN. Encryption works by having all data sent from one computer encrypted in such a way that only the computer it is sending to can decrypt the data.

Main Protocol Use By VPN

There are three main protocol use with VPN Tunnels.These protocols are generally incompatible with each other. They include the following:

IPSec:-
 A set of protocols developed by the IETF to support secure exchange of packets at the IP layer. IPsec has been deployed widely to implement VPNs. IPsec supports two encryption modes: transport and tunnel.

PPTP:-
The Point-to-Point Tunneling Protocol is a technology for creating VPNs, developed jointly by Microsoft, U.S. Robotics and several remote access vendor companies, known collectively as the PPTP Forum.

L2TP:-
Layer Two (2) Tunneling Protocol is an extension to the PPP protocol that enables ISPs to operate Virtual Private Networks (VPNs).

Tuesday, 24 April 2018

Technical Interview Questions asked in Top Companies

Q.1:- How will you implement Linked list with 1 million nodes? How will you access 999999th node?

Q.2:- Clone a linked list with next and random pointer.

Q.3:-Serialise and Deserialise a linked list with next and random pointer.

Q.4:-Given two sorted array(with repetitive elements) find kth minimum number from both array.

Q.5:-Given two linked list both represent a number.Create a linked list that create its sum.

Q.6:-Given a binary search tree, print the path which has sum equal to k and has minimum hopes.i.e. if there are multiple paths with the sum equal to k then print the path with minimum number of nodes.

Q.7:-Given an array, arrange the elements such that the number formed by concatenating the elements is highest. 
E.g.: input = [9, 93, 24, 6], the output should be: [9,93,6,24]. This is because if you concatenate all the numbers, 993624 is the highest number that can be formed.     


Q.8:-Given an string find the longest sub string which is palindrome.  

Q.9:-How would you create your own hash function?

Q.10:-How would you implement red-black tree?

Q.11:-Tell me what you think about Google Charging users $1 per month to use Gmail.

Sunday, 22 April 2018

Queue in Java

Queue is FIFO(First In First Out) data structure.In which every element insert in the rear end and deleted from front end.
Some method which very helpful during coding on the basis of Queue is following-

boolean offer(Object obj):- This method is used for insert an obj in the rear end of the Queue.If insertion of obj is successful it return true else false.

Object poll():- This method return head(first) element of Queue and also delete it.If no element exist in the Queue it return null.

Object remove():- This method also return head(first) element of Queue and delete it But when no element found in the Queue it return NoSuchElementException.

Object peek():-  This method return head(first) element of Queue but It does not delete it and return null when Queue is Empty.

Object element():- This method also return head(first) element of Queue and does not delete it but when Queue is Empty it return NoSuchElementException.

add() method is also use for insert element in the rear end of the Queue.

Sunday, 15 April 2018

Best Questions ask by Google in Job Interviews

Question1:How would I explain the importance of HTML 5 to Larry Page and then to my grandma?


Question2: How could you solve humankind's biggest crisis given $1 billion and a spacecraft?


Question3: Let’s say you have to construct Google maps from scratch and guide a person standing on Gateway of India (Mumbai) to India Gate (Delhi). How do you do the same?


Question4: Estimate the number of students who are college seniors, attend four-year schools, and graduate with a job in the United States every year.


Question5: If you had access to a bank's database, how would you use that information to design an ATM for elderly people?


Question6: How would you solve homelessness in downtown San Francisco?


Question7: A man pushed his car to a hotel and lost his fortune. What happened?


Question8: Anywhere in the world, where would you open up a new Google office and how would you figure out compensation for all the employees at this new office?


Question9: Design an evacuation plan for the building.


Question10: A coin was flipped 1,000 times and there were 560 heads. Do you think the coin is biased.


Question11: What is your opinion on whether or not individuals should be required to use their official name when opening a Gmail or Google + account?


Question12: You’re the captain of a pirate ship, and your crew gets to vote on how the gold is divided up. If fewer than half of the pirates agree with you, you die. How do you recommend apportioning the gold in such a way that you get a good share of the booty, but still survive?


Question13: How many ways can you think of to find a needle in a haystack? Asked in an interview in May 2014


Question14: If you could only choose one song to play every time you walked into a room for the rest of your life, what would it be?


Question15: What’s 2 to the power of 64?


Question16: How many times a day does a clock’s hands overlap?


Question17: What is the probability of breaking a stick into 3 pieces and forming a triangle?


Question18: Tell me what you think about Google charging users $1 per month to use Gmail. This question was asked in an interview in 2015


Question19: How many haircuts do you think happen in America every year?


Saturday, 14 April 2018

Dynamic Programming

Dynamic programming like divide and conquer method , solves problems by combining the solutions to sub-problems.
Divide-and-Conquer algorithms partition the problem into disjoint sub-problems , solve the sub- problem recursively and then combine their solutions  to solve original problem.
In contrast dynamic programming applies when the sub-problem  overlap that is when sub-problem share sub-problem

Feature of Dynamic programing


1)Optimal Substructure
2)Overlapping Sub-Problems

Optimal Substructure


A given problem has optimal substructure property if optimal solution of the given problem can be obtained by using optimal solutions of its sub-problems.
For example :-The shortest path problem has the following optimal substructure property.If a node x lies in the shortest path from node u to node v then the shortest path from u to x and shortest path from from x to v. The standard all pair shortest path algorithm like Floyd Warshall and Bellman-Ford typical example of dynamic programming.

Overlapping Subproblem


Like divide and conquer, Dynamic programming combine solutions to sub-problems.Dynamic programming is mainly used when solution of same sub-problems are needed again and again. In dynamic programming, computed solutions to sub-problems are stored in a table so that these don't have recomputed. So dynamic programming is not used when there are no common(overlapping) sub-problems.

Friday, 13 April 2018

How to add Contact On Gmail

We know that no one can not remember the contact number of everyone and if we have not our phone then we need a technology that store our contact number and when we need it can show.Google service Gmail is one of them.
Let's know how we can add contact number on gmail and see anytime.Follow the steps.

Step1:- Login to your Gmail account.

Step2:- Click on Contact icon which show right side in the up corner.

Step3:- Click on plus(+) icon which show left side in down corner.

Step4:- Fill the contact information like name,email,phone number etc. and click on the save button.

Now your contact information is save on gmail contact.You can see it any time remotely.


Thursday, 12 April 2018

Navigational Satellite

Navigational Satellite is a group of satellite that provide geographical location of object on the earth.It is also used to find the rout or destination address of the object,show the rout of ships and airplane and if anyone forget there rout then through navigational satellite we can find them.Google map is work on the basis of navigational satellite GPS(Global Positioning System).
Now a days only four country USA,RUSSIA,EUROPEAN UNION and CHINA`have their own navigational satellite.But INDIA have also launch their own navigation satellite and very soon it will work.
Navigational satellite and their country name is following

1)NAVSTAR Global Positioning System (GPS)  -USA  32 medium earth orbit satellites operations since 1978
 
2) GLONASS - Russian since 1995 

3) Galilio - European Union - 30 MEO satelites some are  operations since 2014 , expected to be in full service till 2020 
 
4)Beidou-2  - China  , 30 MEO satellites , expanding current regional service into global by 2020

5)IRNSS- INDIA, It is set of eight satellite IRNSS1A,IRNSS1B,IRNSS1C,IRNSS1D,IRNSS1E,IRNSS1F,IRNSS1G,IRNSS1I