Found 33676 Articles for Programming

Elements greater than the previous and next element in an Array in C++

sudhir sharma
Updated on 22-Jan-2021 12:38:53

1K+ Views

In this problem, we are given an array arr[] of n positive integers. Our task is to create a program to find the elements greater than the previous and next element in an Array. Code Description: We need to find the elements of the array that satisfy the condition, the element is greater that the element at index 1 less than it and also is greater than the element at index 1 greater than it.Let’s take an example to understand the problem, Input: arr[] = {3, 2, 5, 7, 3, 4, 5}Output: 7Explanation −Element with index one less than the current element, 5.Element with ... Read More

Element equal to the sum of all the remaining elements in C++

sudhir sharma
Updated on 22-Jan-2021 12:35:22

185 Views

In this problem, we are given an array arr[] consisting of n positive values. Our task is to find the element equal to the sum of all the remaining elements of the array.Code Description: We need to find the element whose value is equal to the sum of all elements of the array except that element.Let’s take an example to understand the problem, Input: arr[] = { 5, 4, 17, 1, 7 }Output: 17Explanation −The sum of the rest of the element is (5 + 4 + 1 + 7 ) = 17, which is equal to the remaining element 17.Solution Approach −A simple ... Read More

Editors and Its types in System Programming in C++

sudhir sharma
Updated on 22-Jan-2021 12:35:41

5K+ Views

Editors are basically computer programs that are utilised to edit files on a computer. The provide environment to a programmer to create, edit, update, format a document in any order he/she wants to.In system programming or programming, editors are software or tools that are used to edit the program. These are basically text editors of special type that have integrated functionality to edit code.Some common program editors are notepad++, visual code, sublime. Also there are some edits that provide things used to do more than just editing the code. They are the integrated development environment (IDE) which can help you edit, debug and run ... Read More

Easy way to remember Strassen's Matrix Equation in C++

sudhir sharma
Updated on 22-Jan-2021 12:36:00

771 Views

It is a matrix multiplication algorithm is based on divide and conquer method. It is used to multiply two matrices of the same size, Finding multiplication of two matrices−The strassen’s Algorithm reduces overhead for multiplication by simplifying the multiplication.Here is the multiplication made using the strassen’s Algorithm: M1 = a*(f - h) M2 = (a + b)*h M3 = (c + d)*e M4 = d*(g - e) M5 = (a + d)*(e + h) M6 = (b - d)*(g + h) M7 = (a - c)*(e + f) This can be easily remembered and the algorithm code can be decoded. For this we have a few rules, first remember these ... Read More

Dumpster Diving/Trashing in C++

sudhir sharma
Updated on 22-Jan-2021 12:30:06

134 Views

Dumpster diving or trashing is a technique used in cyber security and information technology which is commonly used by hackers to extract data. It is based on the fact that “something which is worthless for someone can be of great usage for someone else”. It works based on the idiom, “One man’s trash is another man’s treasure”. Trashing refers to searching online trash (unused information) and finding out fruitful information about a business or person to use it to perform hacking related activities.This dumpster diving is used to gather information to try to hack or extract information of business using a phishing technique by pretending to be ... Read More

Dudeney Numbers in C++

sudhir sharma
Updated on 22-Jan-2021 12:29:45

634 Views

A mathematical number defined in number theory in a given number base is a natural number equal to the perfect cube of another natural number such that the digit sum of the first natural number is equal to the digit sum of the second number(wikipedia).The number was found by Henry Dudeney. Its mathematical formula is −Here, we are given an integer n. Our task is to check whether the given number n is a dudeney number or not. Let’s take an example to understand the problem, Input: N = 17592Output: NoExplanation:  The given number is not a dudney number.Solution Approach −The solution lies ... Read More

Dual Mode operations in OS in C++

sudhir sharma
Updated on 22-Jan-2021 12:29:14

3K+ Views

Every system works on operations mainly in two modes to safeguard hardware’s computation. The two modes are −User ModeKernel ModeUser Mode −The OS mode in which all the user applications and programs will run. Here, the user instructions are worked on and softwares like playing music is run.Kernel Mode −The OS mode in which the hardware loads and its computations are performed. Only privileged instructions are allowed to run in kernel mode. Some common privileged instructions are −Input-Output ManagementSwitching modes between user mode and kernel mode.Interrupt managementDual Mode in OS is the switching of modes between the two modes and switching of mode ... Read More

How can Keras be used to remove a layer from the model using Python?

AmitDiwan
Updated on 21-Jan-2021 05:56:18

2K+ Views

Tensorflow is a machine learning framework that is provided by Google. It is an open−source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes.Keras was developed as a part of research for the project ONEIROS (Open ended Neuro−Electronic Intelligent Robot Operating System). Keras is a deep learning API, which is written in Python. It is a high−level API that has a productive interface that helps solve machine learning problems.It is highly scalable, and comes with cross platform abilities. This means Keras can be run on ... Read More

Explain how a sequential model (Dense Layer) be built in Tensorflow using Python

AmitDiwan
Updated on 21-Jan-2021 05:56:32

314 Views

Tensorflow is a machine learning framework that is provided by Google. It is an open−source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes.The ‘tensorflow’ package can be installed on Windows using the below line of code −pip install tensorflowThe layers API is parth of Keras API. Keras means ‘horn’ in Greek. Keras was developed as a part of research for the project ONEIROS (Open ended Neuro-Electronic Intelligent Robot Operating System). Keras is a deep learning API, which is written in Python. It is a ... Read More

How can a sequential model be created incrementally with Tensorflow in Python?

AmitDiwan
Updated on 21-Jan-2021 05:54:59

298 Views

A sequential model is relevant when there is a plain stack of layers. In this stack, every layer has exactly one input tensor and one output tensor. It is not appropriate when the model has multiple inputs or multiple outputs. It is not appropriate when the layers need to be shared. It is not appropriate when the layer has multiple inputs or multiple outputs. It is not appropriate when a non-linear architecture is required.Tensorflow is a machine learning framework that is provided by Google. It is an open−source framework used in conjunction with Python to implement algorithms, deep learning applications ... Read More

Advertisements