Computer Programming Articles

Page 3 of 18

Most Asked Problems on Queue Data Structure in Programming Interviews

Yash Shri
Yash Shri
Updated on 06-Feb-2025 847 Views

A Queue is the data structure used to store and manage the data in a specific order by following the principle of First In First Out (FIFO). The article "Most Asked Problems on Queue Data Structure in Programming Interviews" benefits you by providing good examples of every problem of the tree. It provides the problems from the basic to the hard level. It covers the core and important problems of Queue.Here is the list of queue problems to excel in the ...

Read More

Most Asked Problems on Recursion Algorithm in Coding Interviews

Yash Shri
Yash Shri
Updated on 06-Feb-2025 436 Views

Recursion Algorithm in Data Structure and Algorithms is used to call the function by itself. The article "Most Asked Problems on Recursion Algorithm in Coding Interviews" benefits you by providing good examples of every problem of the recursion. It provides the problems from the basic to the hard level. It covers the core and important problems of the recursion algorithm. The following are the main problems with the recursion algorithm − Easy Recursion Problems Print Pattern Recursively ...

Read More

Top 50 Dynamic Programming Coding Problems for Interviews

Yash Shri
Yash Shri
Updated on 31-Jan-2025 492 Views

Dynamic Programming in Data Structures and Algorithms is used for breaking down the main problems into smaller problems. This article also breaks down all the problems into different sections which will help you to solve the problems section-wise. It includes the most common and trending problems of dynamic programming for clearing the interviews. Here are the problems list from beginner to expert level for learning the DP − Beginner DP Problems Climbing Stairs House Robber Maximum Subarray Coin Change Best Time to Buy and Sell Stock Pascal's Triangle Range Sum Query Fibonacci Number Min Cost Climbing Stairs Maximum Profit ...

Read More

What is the difference between One-Pass Compiler and Multi-Pass Compiler?

Ginni
Ginni
Updated on 15-Jan-2025 18K+ Views

One-Pass CompilerOne pass compiler reads the code only once and then translates it. The one-pass compiler passes only once through the parts of each compilation unit. It can translate each part into its final machine program. In the one-pass compiler, when the line source is processed, it is scanned and the token is extracted. This is in contrast to a multi-pass compiler which modifies the program into one or more intermediate representations in steps between source program and machine program, and which convert the whole compilation unit in each sequential pass.A one-pass compiler is fast since all the compiler code ...

Read More

What is the difference between Compiler and Interpreter?

Ginni
Ginni
Updated on 15-Jan-2025 87K+ Views

Both compilers and interpreters are the language processors used to convert software codes written in high-level language into machine language codes. Compilers and interpreters are types of system software. They are required because a computer cannot process a code written in high-level programming language like C, C++, Java, etc. Therefore, we convert a HLL code into machine code for execution. In this article, we will highlight all the major differences between a compiler and an interpreter. Let's start with some basics so that it will become easier to understand their differences. What is a Compiler? A language processor ...

Read More

Difference Between Assembler and Interpreter

Shirjeel Yunus
Shirjeel Yunus
Updated on 05-Aug-2024 717 Views

The assembler and interpreter are responsible for the execution of a program. The assembler converts the code written in an assembly language into the machine code. Interpreters execute the code directly in a sequential order. In this article, we will discuss the difference between assembler and interpreter. What is an Assembler? An assembly language consists of mnemonics to write code in human-readable language. These mnemonics are GO, HALT, JUMP, NOT, and many more. An assembler is used to translate the code written in assembly language into machine language which could be understood by the machine. Types of Assemblers Assemblers are ...

Read More

Construct a Predictive Parsing table for the following grammar & also check whether string nid + id * id is accepted or not.

Ginni
Ginni
Updated on 08-Nov-2023 43K+ Views

Problem − Consider the following grammar − E → TE′ E′ → +TE′|ε T′ → FT′ T′ → FT′|ε F → (E)|id Solution − Step1− Elimination of Left Recursion & perform Left Factoring As there is no left recursion in Grammar so, we will proceed as it is. Also, there is no need for Left Factoring. Step2− Computation of FIRST FIRST(E) = FIRST(T) = FIRST(F) = {(, id} FIRST (E′) = {+, ε} FIRST (T′) = {*, ε} Step3− Computation of FOLLOW FOLLOW (E) = FOLLOW(E′) = {), $} FOLLOW (T) = FOLLOW(T′) = {+, ), $} FOLLOW (F) = ...

Read More

What is LEX?

Ginni
Ginni
Updated on 03-Nov-2023 30K+ Views

It is a tool or software which automatically generates a lexical analyzer (finite Automata). It takes as its input a LEX source program and produces lexical Analyzer as its output. Lexical Analyzer will convert the input string entered by the user into tokens as its output.LEX is a program generator designed for lexical processing of character input/output stream. Anything from simple text search program that looks for pattern in its input-output file to a C compiler that transforms a program into optimized code.In program with structure input-output two tasks occurs over and over. It can divide the input-output into meaningful ...

Read More

What is Input Buffering in Compiler Design?

Ginni
Ginni
Updated on 01-Nov-2023 58K+ Views

Lexical Analysis has to access secondary memory each time to identify tokens. It is time-consuming and costly. So, the input strings are stored into a buffer and then scanned by Lexical Analysis.Lexical Analysis scans input string from left to right one character at a time to identify tokens. It uses two pointers to scan tokens −Begin Pointer (bptr) − It points to the beginning of the string to be read.Look Ahead Pointer (lptr) − It moves ahead to search for the end of the token.Example − For statement int a, b;Both pointers start at the beginning of the string, which ...

Read More

Difference Between Recursion and Iteration

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 01-Nov-2023 47K+ Views

Recursion and Iteration both repeatedly execute the set of instructions. Recursion occurs when a statement in a function calls itself repeatedly. The iteration occurs when a loop repeatedly executes until the controlling condition becomes false. The basic difference between recursion and iteration is that recursion is a process always applied to a function and iteration is applied to the set of instructions which we want to be executed repeatedly. Read through this article to find out more about Recursion and Iteration and how they are different from each other. What is Recursion? Recursion is defined as a process in which a function calls itself repeatedly. Recursion uses selection structure. If the recursion step does ...

Read More
Showing 21–30 of 177 articles
« Prev 1 2 3 4 5 18 Next »
Advertisements