Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Server Side Programming Articles - Page 414 of 2650
1K+ Views
This tutorial discusses writing a program to calculate the power of a number in the Haskell programming language. The nth power of a number is the value when the number is multiplied by itself n times. The power of numbers can be expressed in exponential forms “a^n”, a is raised to the power of n. Here a is called the base and n is called an exponent. For example, 2 raised to the power of 5 is 2^5 i.e 32. In this tutorial, we see different ways to implement a program to calculate the power of a number. Program ... Read More
805 Views
We have already discussed the basics of hashtables. A hashtable collection in C# is used to store key−value pairs wherein each of these key-value pairs is organized based on the hash code of the key. This hash code is calculated using a hash code function. Internally, the hashtable uses buckets to store data. A bucket is nothing but a virtual group of elements within the hashtable. A hash code is associated with each bucket. Programmatically, a hashtable is similar to a dictionary object but unlike in dictionary object, a hashtable can store objects of different data types. Performance−wise, hashtables exhibit ... Read More
296 Views
This tutorial discusses writing a program to find the Surface area and volume of a cuboid in the Haskell programming language. A cuboid is a solid shape that has six rectangular faces. A cuboid has three dimensions length, breadth, and height. The surface area of a cuboid is the total area of the six rectangular faces i.e 2*length*breadth + 2*length*height + 2*breadth*height. The volume of the cuboid is length*breadth*height. As volume is area*height. In this tutorial we see, Program to find the surface area of a cuboid. Program to find the volume of a cuboid. Algorithm Steps ... Read More
1K+ Views
In this tutorial, we discuss writing a program to count the number of digits in an integer in the Haskell programming language. In this tutorial, we see three ways to implement a program to count digits in Haskell. Program to count the number of digits in an integer. Program to count the number of digits in an integer using if-else.Program to count the number of digits in an integer using the length function. Algorithmic Steps Take input or initialize a variable for an integer. Implement the program logic to count the digits in an integer. Print or display ... Read More
848 Views
This tutorial discusses writing a program to reverse a number in the Haskell programming language. In this tutorial, we see two ways to implement a program in Haskell to reverse a number. Program to reverse a number using the list function reverse. Program to reverse a number using a recursive function. Example 1 Program to reverse a number using the list function reverse. -- function declaration reverseNumber :: Int->Int -- function definition reverseNumber n = k where temp = reverse (show n) ... Read More
275 Views
This tutorial discusses writing a program to print the area of a parallelogram in the Haskell programming language. A parallelogram is a quadrilateral with opposite sides that have the same size and are parallel to each other. In this tutorial, We see three ways to implement Program to compute the area of a parallelogram using height and base. Program to compute the area of a parallelogram using sides. Program to compute the area of a parallelogram using the diagonals. Algorithm Steps Take input or initialize the variable for the size of the parallelogram. Implement the program ... Read More
547 Views
This tutorial discusses writing a program to print the area of a rectangle in the Haskell programming language. The rectangle is a quadrilateral with opposite sides having the same length and adjacent sides at right angles. The area of a rectangle is equal to its product of length and breadth. If the length and breadth of the rectangle are 5 and 6 respectively, then the area of that is 30 units(5*6). In this tutorial, We see four ways to implement Program to compute the area of a rectangle using the infix operator “*”. Program to compute the area ... Read More
2K+ Views
There are some data structures called dictionaries that are available in various computer languages. A particular form of quicker data structure that stores data based on keys and values is a dictionary. It keeps the key-value pair there so that certain components can be quickly searched by the keys in virtually real-time. The dictionary-like data structure is contained in the C++ STL language standard. This data structure is known by the name "map." The map generates a pair of keys and values of any type (the type must be defined before compilation as we are using C++). In this section, ... Read More
6K+ Views
In different programming languages, there are some data structures available that are known as dictionaries. The dictionaries are a special kind of faster data structure that stores data based on keys and values. It stores the key-value pair into it so that some elements can easily be searched in almost constant time by the keys. In C++, the dictionary−like data structure is present in C++ STL. The name of this data structure is named as ‘map’. The map creates a pair of keys and values of any type (since we are using C++, the type must be defined before compilation). ... Read More
3K+ Views
Many computer languages provide dictionaries, which are a type of data structure. A dictionary is one type of faster data structure that stores data based on keys and values. It retains the key−value combination there so that the keys can easily search for certain components in almost real time. The C++ STL language standard includes a dictionaries−like data structure. The term "map" is used to describe this data structure. The map creates a pair of keys and values of any type (since we are using C++, the type must be defined before compilation). This section will demonstrate how to update ... Read More