Posts

Use of Recurrence Relation | How to calculate the time complexity of Algorithm

Image
When we are preparing for the job as a software developer in MNC's like Google, Mata, IBM, etc., we usually focus mostly on the data structure and algorithms, and sometimes we fall behind in the analysis of the algorithms. So it is also a very demanding skill for tech companies to analyze the performance of the algorithms in terms of time and space complexity. For analyzing the algorithms, we first create the recurrence relation. What is the recurrence relation in the context of algorithms? A recurrence relation is a mathematical relation or expression that is used to describe the time complexity of a problem in terms of its solution to smaller instances of the same problem. A typical recurrence relation is in the form: T(n) = f(n) + T(h(n)) where T(n) is the time complexity of the problem of size n, f(n) is the time complexity of the current problem, and h(n) is the size of the subproblem being solved. The recurrence relation is used to calculate the time complexity of various alg

Most Asked Coding Questions In IT Companies

Frequently asked Questions in the Technical round of the IT Companies. 1. Program to print the String in Reverse. package iamAlien; import java.util.Scanner; public class Alien { public static void main(String[] args) {       Scanner sc = new Scanner(System.in);         System.out.println("Enter Any String without Space: ");       String reverse ="";       String str = sc.nextLine();       for(int i=0; i<str.length(); i++)       {     reverse = str.charAt(i) + reverse;              }       System.out.println(reverse); } } 2. Program to count the occurring a particular Alphabet in the word taken by the User. package iamAlien; import java.util.Scanner; public class Alien { public static void main(String[] args) {       Scanner sc = new Scanner(System.in);         System.out.println("Enter Any your Sentence: ");       String str = sc.nextLine();       System.out.println("Enter the Alphabet Which you want to Count:");       char alp =sc.next

C Program To Insert Element In Singly Linked List ( Insert at last, Insert at beginning and Insert at some position )

Linked List is a sequential data structure in which elements are stored via link. Every node is connect with other node. Generally Linked List are three type: Singly Linked List Doubly Linked List Circular Linked List In this article we will cover how we can insert element in the singly linked list at the different position Singly Linked List In singly linked list data structure there are mainly two part first is link part and second is data part. In the link part of singly linked list the base address of the next node is stored. And in the data part actual data is stored.        1->2->3->4->5->NULL Link part of the last node of the singly linked list contain NULL. Insert Data At Beginning In The Singly Linked List First of all check linked list is empty or not if linked list have no node then make the newNode->NULL and make newNode as a Head node. If linked list have already some nodes then make newNode->next = head and head = newNode. Insert Data At End In The Si

How To Connect With Oracle Database | Create Your Own User In Oracle Database

How to work with Oracle database a guide from beginner to advance. In this article, we will look at all the concepts which are useful to work with the oracle database. Steps to follow work with Oracle Database: Install the Oracle database from the Oracle official site. Set the password for the system/sys user you can set any password which you want to set. Now is the time to design our own user in the Oracle database but before designing the user we want to connect sys / system or any other user. Type command in SQL Command line: connect system/password     SQl>show user To create our own user with Harshit name . - SQL> create user Harshit identified by abc; user id  - Harshit  Password- abc To connect with the Harshit user we need to assign the privileges. - SQL> grant connect, resource to Harshit; -SQL> grant dba to Harshit;  - Now Harshit user can perform dba task also, all privilege affected on new session. -SQL> revoke dba from Harshit; - until re-login Harshit use

How To Create Table In HTML - Tech Worthy Mind

Image
In HTML we can use a table tag to create a table. By using the <TR> tag we can create a row on the web page and by using the <TD> tag we can enter the data on the table row. In this article, we will look at how to create a table in HTML and I am sure that after reading this blog you will be able to create a table HTML. Table In HTML  [ hide ] How to create a Table In HTML   As I discuss above that <table> tag is used to define a table in HTML. There are some other tags that we used to store data in a structured form are as follows: <tr> tag : used to display table row. <td> tag : used to display table data. <th> tag : to create table heading. <thead> tag : to create table head. <tbody> tag : to create table body.  To add a caption in the table we use the <caption> tag Don't get panic after seeing these tags I will explain to you all the tags in a simple and easy form with examples. col span Attribute It is used to create

Basic HTML Tags List With Examples | Tech Worthy Mind

Image
HTML is used to design the skeleton of web pages, In this article, I am going to share with you a complete guide of HTML form basic to advance. Basically, HTML is the base of any web page or the foundation of a webpage starting from the HTML, and CSS works as the beauty of web pages. In the blog, I will try to cover all the important concepts in HTML. HTML Tags   [ hide ] Start to Learn HTML Before we start learning HTML we need to know basic knowledge i.e Where we can write HTML code, how to execute HTML code. We can write HTML code in any text editor or code editor like visual code studio, etc. And next question is that where we can run HTML code so the answer is that we can run in any browser like chrome, firefox, etc. Now we are ready to learn HTML so get started HTML. Tags In HTML How to create an HTML file : Before writing some code in HTML we have to save that file by creating that filename using the filename.html  Note: Index.html is a special file name in HTML which is

What is Nmap | How install Nmap Using Termux?| Nmap Commands

Image
If you want to install Namp on your android phone using the Termux, you first need to know what Nmap is and how you can use it, so go through the complete article to get the complete info about this. Nmap [ hide ] What is Nmap? Nmap is an open-source security scanner used to find host stand services on your computer network; it sends the specially crafted packets to the target hosts and then analyzes the responses. Some Features of Nmap is: Version detection  OS detection Scriptable interaction with the target Host discovery  Port scanning  How to install Nmap Using Termux? Firstly Open the Termux app on your phone and write the following commands : $ pkg update $ pkg install Nmap Now Nmap is installed in termux. Steps to install Nmap in other Linux devices : Open terminal and type the following commands : $ apt update $ apt install Nmap Install in ubuntu : $ Sudo apt update $ Sudo apt install Nmap and this is how Nmap is installed on your system. Some Useful Nmap Commands :