Posts

Hacker-rank - Java Regex 2 - Duplicate Words Solutions

       import java.util.Scanner ;         import java.util.regex.Matcher ; import java.util.regex.Pattern ; public class DuplicateWords { public static void main ( String [] args ) { String regex = "(\\b\\w+\\b)(\\s+\\1\\b)+" ; Pattern p = Pattern . compile ( regex , Pattern . CASE_INSENSITIVE ); Scanner in = new Scanner ( System . in ); int numSentences = Integer . parseInt ( in . nextLine ()); while ( numSentences -- > 0 ) { String input = in . nextLine (); Matcher m = p . matcher ( input ); // Check for subsequences of input that match the compiled pattern while ( m . find ()) { input = input . replaceAll ( m . group (), m . group ( 1 )); } // Prints the modified sentence. System . out . println ( input ); }

creation of first node in linked list

Image
A  linked list  is a set of dynamically allocated nodes, arranged in such a way that each node contains one value and one pointer. The pointer always points to the next member of the  list . If the pointer is NULL, then it is the last node in the  list . ... If that pointer is also NULL, then the  list  is considered to be empty. paste it and run this code.. //CREATING A NODE Against LinkedList IN C #include #include #include #include //defining a datatype struct node //'struct' is keyword and 'node' is a tag { int data; struct node *next; }; struct node *head=0; int main() { int *newnode; newnode=(struct node*)malloc(sizeof(struct node));//malloc returns a void pointer so we have to pointer cast printf("enter the data");//asking of data scanf("%d",&newnode->data);//pasting the element at data part newnode->next=0; head=newnode; } if any further assistance required then please do co

10 tips on how to improve your Wi-Fi signal

Image
10 tips on how to improve your Wi-Fi signal Are you having trouble with your Wi-Fi signal again? Wireless signals can often drop out for no apparent reason, and therefore, getting frustrated with your internet connection can seem like second nature. However, most of the time you’ll find that the issue isn’t with your internet connection itself, but the Wi-Fi signal being broadcast from your modem or router. It’s important to understand the difference! Here are a few ways you can improve your Wi-Fi signal and performance of your modem/router. 1. Locate the best place for your modem router If you’re a designer, having your router out in the open may clash with your aesthetic. But if you want and need the best Wi-Fi signal in your home, this is something you’ll just have to deal with it. Make sure your modem/router is in the centre of your home so that you have the best possible coverage everywhere. If it doesn’t lay flat on a surface, consider elevating it and mounti

STACK Programming in C

Image
STACK Programming in C Language- Stack Data Structure Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). There are many real-life examples of a stack. Consider an example of plates stacked over one another in the canteen. The plate which is at the top is the first one to be removed, i.e. the plate which has been placed at the bottommost position remains in the stack for the longest period of time. So, it can be simply seen to follow LIFO(Last In First Out)/FILO(First In Last Out) order. problem statement:perform the following operations -1. PUSH,                                                                                        2.POP                                                                                        3.PEEP                                                                                        4.DISPLAY C-CODE: #incl

SOFTWARE ENGINEERING FULL

Image
SOFTWARE ENGINEERING Name of modules:- 1)   Fundamental of S.E. 2)     System analysis 3)     System planning 4)    System design 5)     System documentation 6)    Coding and programming 7)     Software testing 8)    Cost and time estimation 9)    Software project management 10)              Software quality 11)               CASE. Top level Middle level Low level ·       Set of instruction-> this is program. ·       Set of program-> software. This software is a collection of computer programs, procedure, rules and associative documentation and data. Program is generally used the developer of a specific program to make a particular software. Q) Some characteristics of software includes:- 1)              Software is developed or engineer. 2)              Most of software is custom build rather than assemble from existing component. 3)              Computer program and asso