menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

Programming News

source image

Prodevelopertutorial

1w

read

377

img
dot

Image Credit: Prodevelopertutorial

Read Full Article

like

22 Likes

source image

Prodevelopertutorial

1w

read

339

img
dot

Image Credit: Prodevelopertutorial

Check if given two nodes are siblings to each other in Binary Tree

  • Given a binary tree root node and 2 node values, check if those 2 nodes are siblings.
  • If the node values are 7 and 15, they are siblings; if the node values are 7 and 18, they are not siblings.
  • The solution involves checking the children of each node to see if they match the given node values.
  • If a match is found, return true; otherwise, return false.

Read Full Article

like

20 Likes

source image

Prodevelopertutorial

1w

read

377

img
dot

Image Credit: Prodevelopertutorial

Find Sibling node of a given node value in Binary Tree

  • Given a binary tree root node and a node value, get the sibling of that node.
  • If the input node value is 10, its sibling is 25
  • If the input node value is 7, its sibling is 15
  • If the input node value is 16, its sibling is NULL

Read Full Article

like

22 Likes

source image

Prodevelopertutorial

1w

read

46

img
dot

Check if given Binary Tree is BST

  • The binary tree is a BST

Read Full Article

like

2 Likes

source image

Prodevelopertutorial

1w

read

37

img
dot

Find Parent of a given node value in Binary Tree

  • Given a binary tree node and root node, get the parent node of that node.
  • The solution checks if the children nodes equal the given value.
  • If a match is found, the corresponding parent node is returned.
  • The process is done recursively on the left and right child nodes.

Read Full Article

like

2 Likes

source image

Prodevelopertutorial

1w

read

134

img
dot

Check if all Leaf Nodes are at same level in Binary tree

  • To check if all the leaf nodes are at the same level in a binary tree, we can use a pre-order traversal approach.
  • Start by visiting the left leaf and update the level value.
  • Then, check the right leaf and compare the level values.
  • If both levels are the same, return true; otherwise, return false.

Read Full Article

like

8 Likes

source image

Prodevelopertutorial

1w

read

142

img
dot

Image Credit: Prodevelopertutorial

Perform PreOrder traversal on a Binary Tree by without Recursion

  • Perform PreOrder traversal on a Binary Tree without using recursion
  • PreOrder traversal visits the root node, followed by the left child, and then the right child
  • A stack is used to implement the PreOrder traversal without recursion
  • The algorithm starts by pushing the root node into the stack and prints its value

Read Full Article

like

8 Likes

source image

Prodevelopertutorial

1w

read

75

img
dot

Image Credit: Prodevelopertutorial

Display Reverse Level Order Traversal by using queue

  • To display nodes in reverse level order traversal, we use a stack and a queue.
  • First, we enqueue the root node into the queue.
  • While the queue is not empty, we dequeue a node, push it into the stack, and enqueue its right and left child nodes.
  • Finally, we print the contents of the stack.

Read Full Article

like

4 Likes

source image

Prodevelopertutorial

1w

read

339

img
dot

Image Credit: Prodevelopertutorial

Display nodes at given level in Binary Tree

  • Given a binary tree root node and a level, display all the nodes present in that level.
  • Example:
  • Nodes at level 1 are : 16
  • Nodes at level 2 are : 10, 25
  • Nodes at level 3 are : 7, 15, 18, 30
  • Solution: This problem can be solved by recursive traversal.
  • If the level is 1, print the node value.
  • Recursively call the function for the left and right nodes with level reduced by 1.
  • C++ code example provided to demonstrate the solution.
  • Output: Nodes at level 2 are 10, 25

Read Full Article

like

20 Likes

source image

Prodevelopertutorial

1w

read

378

img
dot

Image Credit: Prodevelopertutorial

Get Number of Nodes in a Binary Tree

  • Given a binary tree, get the total number of nodes in it.
  • The total number of nodes in the given binary tree is 7.
  • This problem can be solved by recursive traversal.
  • We call 'get_num_of_nodes' recursively for left and right nodes to calculate the solution.

Read Full Article

like

22 Likes

source image

Prodevelopertutorial

1w

read

352

img
dot

Image Credit: Prodevelopertutorial

Get difference between values at Even and Odd level in a binary tree

  • Given a binary tree, we need to find the difference between the sum of the nodes at odd levels and the sum of the nodes at even levels.
  • The problem can be solved using recursive traversal.
  • We calculate the sum of nodes at odd levels and even levels separately by traversing the tree recursively.
  • Finally, we return the difference between the sum of nodes at odd levels and the sum of nodes at even levels.

Read Full Article

like

21 Likes

source image

Medium

1w

read

155

img
dot

No route found for “POST /login” (from “http://xx.net/authentication/signin”)

  • We have two distinct applications: an Angular application responsible for the user interface and a Symfony application handling the backend logic and data.
  • Apache2 acts as an intermediary, routing requests to the appropriate application based on the URL. This improves security and simplifies URL management for the frontend.
  • The virtual host configuration in Apache2 allows for intelligent routing of requests to the Angular and Symfony applications based on the URL path.
  • Ensure correct configurations, PHP handler, environment variables, and use of error logs when setting up the reverse proxy in Apache2 for Angular and Symfony applications.

Read Full Article

like

9 Likes

source image

Medium

1w

read

352

img
dot

Image Credit: Medium

The Phenomenon of KGF: A Game-Changer in Indian Cinema

  • The KGF franchise has become a game-changer in Indian cinema, setting new benchmarks for storytelling, action, and cinematic scale.
  • The franchise consists of two parts: KGF: Chapter One in 2018 and KGF: Chapter Two in 2022, both receiving critical acclaim and commercial success.
  • The plot is set in the backdrop of the Kolar Amber Fields in Karnataka and follows the journey of Rocky, played by Yash, who rises from poverty to gain control over the lucrative mines.
  • KGF combines mass appeal with a layered narrative, exploring themes of revenge, power, and redemption. The film's intense action sequences, powerful dialogues, and emotionally charged moments have resonated with audiences across languages and cultures.

Read Full Article

like

21 Likes

source image

Medium

1w

read

205

img
dot

Everything You Need to Know About Baby Pampers

  • Pampers are disposable diapers designed to provide complete protection to babies from newborn to toddlers.
  • Features of Baby Pampers include superior absorbency, soft and skin-friendly materials, and a comfortable fit.
  • Pampers use advanced absorbent technology to keep babies dry for hours, ensuring uninterrupted sleep.
  • Made from hypoallergenic materials, Pampers minimize the risk of diaper rash and promote healthy baby skin.

Read Full Article

like

12 Likes

source image

Medium

1w

read

37

img
dot

Image Credit: Medium

We Shouldn’t Call Them “Best Practices” — And Blindly Follow Them

  • Preaching and blindly following 'best practices' in coding may not always be the right approach.
  • Best practices often lack context and may not be suitable for every situation.
  • Migrating legacy applications and bringing their owners up to speed pose unique challenges.
  • Instead of strictly adhering to best practices, it is sometimes better to focus on doing the simplest thing that works.

Read Full Article

like

2 Likes

For uninterrupted reading, download the app