Arjun Thakur has Published 1025 Articles

How to implement Traversal in Singly Linked List using C#?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 12:26:27

565 Views

Set a linkelist collection −var list = new LinkedList();Now, add elements −list.AddLast("One"); list.AddLast("Two"); list.AddLast("Four");Now, let us add new elements in the already created LinkedList −LinkedListNode node = list.Find("Four"); list.AddBefore(node, "Three"); list.AddAfter(node, "Five");Let us now see how to traverse through the nodes in a Singly Linked List −Exampleusing System; using System.Collections.Generic; ... Read More

How to initialize a tuple to an empty tuple in C#?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 12:20:26

3K+ Views

To initialize a tuple to an empty tuple −Tuple myTuple;If you want to check for values in a tuple, that whether it is null or not −Exampleusing System; namespace Demo {    class Program {       static void Main(string[] args) {          Tuple ... Read More

How we can find all the triggers associated with a particular MySQL table?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 12:04:06

127 Views

We can find all the triggers associated with a particular table with the help of the following query −mysql> Select * from INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA = 'query'AND EVENT_OBJECT_TABLE = 'Student_info'\G *************************** 1. row ***************************            TRIGGER_CATALOG: def             TRIGGER_SCHEMA: query     ... Read More

Microwave Transmission

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 11:09:37

12K+ Views

In the electromagnetic spectrum, waves within the frequencies 1GHz to 300GHz are called microwaves.Features of MicrowavesMicrowaves travel in straight lines, and so the transmitter and receiver stations should be accurately aligned to each other.Microwave propagation is line – of – sight propagation. So, towers hoisting the stations should be placed ... Read More

Communication Satellites

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 11:08:50

21K+ Views

A communication satellite is an artificial satellite that acts as a large repeater in the sky. It receives signals from the source transmitter, amplifies using transponders, and relays them to the receiver. Thus, it creates a communication channel between locations of the earth that would not have been able to ... Read More

How to convert an array of characters into a string in C#?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 11:01:48

211 Views

Let us first set an array of 5 characters −char[] ch = new char[15]; ch[0] = 'T'; ch[1] = 'r'; ch[2] = 'i'; ch[3] = 'c'; ch[4] = 'k';Now convert them into a string −string str = new string(ch);Here is the complete code −ExampleUsing System; class Program {    static ... Read More

How can we convert subqueries to RIGHT JOIN?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 10:52:59

198 Views

To make it understand we are using the data from the following tables −mysql> Select * from Customers; +-------------+----------+ | Customer_Id | Name     | +-------------+----------+ | 1           | Rahul    | | 2           | Yashpal  | | 3 ... Read More

Sort the words in lexicographical order in C#

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 10:24:33

1K+ Views

Firstly, set a string array −string[] arr = new string[] {    "Indian",    "Moroccon",    "American", };To sort the words in lexicographical order −var sort = from a in arr orderby a select a;Example Live DemoLet us see the complete code −using System; using System.Linq; class Program {    static ... Read More

C# program to find K’th smallest element in a 2D array

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 10:07:46

590 Views

Declare a 2D array −int[] a = new int[] {    65,    45,    32,    97,    23,    75,    59 };Let’s say you want the Kth smallest i.e, 5th smallest integer. Sort the array first −Array.Sort(a);To get the 5th smallest element −a[k - 1];Let us see ... Read More

How to find the product of 2 numbers using recursion in C#?

Arjun Thakur

Arjun Thakur

Updated on 22-Jun-2020 10:04:30

243 Views

Firstly, set the two numbers to be multiplied.val1 = 10; val2 = 20;Now cal the method to find the product.product(val1, val2);Under the product method, a recursive call will get you the product.val1 + product(val1, val2 – 1)Let us see the complete code to find the product of 2 numbers using ... Read More

Advertisements