OSI | TCP/IP |
---|---|
It Has Seven Layer | It Has Four Layer |
Transparent Layer Granite Delivery Of Packets | Transport Layer Doesn't Granite Of Packets |
Horizontal Approach In Transmission | Vertical Approach In Transmission |
Separate Session Layer | No Session Layers |
Separate Presentation Layer | No Presentation Layer |
Network Layer Provide Both Connection Less And Oriented Services | Only Connection Less Services |
OSI is truly a general model | it be used for any other application |
import java.util.* ; //Longest Prefix Which Is Also Suffix Which Is Used To Found a Pattern Through Avoid Repeated Characters in Given String. We Will Discuss KMP ALGORITHM TO Find A Pattern In Given String Latter. class lbs{ public static void main( String [] args){ Scanner in= new Scanner(System.in); //Get Input From User String s=in.nextLine(); //Convert String Into Char Array char [] ch=s.toCharArray(); int n=s.length(); int [] lbsArr= new int [n]; int j= 0 ,i= 1 ; lbsArr[ 0 ]= 0 ; //LPS ARRAY ALGORITHM /* i=1; j=0; string s="aaab" while i<n if s[i]==s[j]: lpsArr[i]=j; j=j+1 i=i+1 else: if j==0: lbsArr[j]=0 i=i+1 else: ...
Comments
Post a Comment