Given an integer x, return true if x is palindrome integer.

An integer is a palindrome when it reads the same backward as forward. For example, 121 is palindrome while 123 is not.

Example 1:

Example 2:

Program

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0.

Assume the environment does not allow you to store 64-bit integers (signed or unsigned).

Example 1:

Example 2:

Program:

Facts of unique pointer

  1. The unique pointer doesn’t share its memory.
  2. It can’t be copied to another unique by using an assignment operator.
  3. The ownership can be moved from one to another.
  4. “unique ptr” wants to limit the ownership of the object.

Program

Output

In c++, we can’t assign the address of a variable of one data type to a pointer of another data type.

In such a case, use a void pointer or generic pointer.

Facts:

  1. malloc() and calloc() returns void * type and allow this function to be used to allocate memory of any data type.
  2. void pointers are used to implement a generic function in c.
  3. void pointer can’t be dereferenced.

Output:

4. void pointer doesn’t allow pointer arithmetic.

Program:

Output

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

You can return the answer in any order.

Example 1:

Example 2:

Program:

What is Docker?

The leading container platform that allows you to wrap your app, all of its dependencies, and library into a small executable bundle that can be run anywhere.

What is Ansible?

Ansible is an open-source DevOps tool that can help the business in configuration management, deployment, provisioning, etc…

What is Ansible?

Ansible is an open-source DevOps tool that can help the business in configuration management, deployment, provisioning, etc. It is designed to automate system management tasks. Ansible “programs” are called plays and are a collection of tasks in a playbook. …

What is cRPD?

Containerized routing protocol process (cRPD) is Juniper’s routing protocol process (rpd) decoupled from Junos OS and packaged as a Docker container to run in Linux-based environments. rpd runs as a user-space application and learns route state through various routing protocols and maintains the complete set in routing information base (RIB)…

Dineshbaburam

Network Automation Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store