Kapil Patel

Given a string, write a c function to check if it is palindrome or not.

A string is said to be palindrome if reverse of the string is same as string. For example, “kppk” is palindrome, but “kppa” is not palindrome.

CPP

#include<bits/stdc++.h>
using namespace std;
bool isPalindrome(string str)
{
int left = 0;
int right = str.length()-1;
while(str[left] == str[right] )
{
if(left == right-1 || left == right)
{
return true;
}
left++;
right--;
}
return false;
}

--

--

This is a copy paste question from Daily Bite email.

This question is asked by Google. Given a string, reverse all of its characters and return the resulting string.

Ex: Given the following strings…

“Cat”, return “taC”
“The Daily Byte”, return "etyB yliaD ehT”
“civic”, return “civic”

Solution using C#

using System;public class Test
{
public static void Main()
{
// your code goes here
string name = "Kapil";

System.Console.WriteLine(name);
int length = name.Length;
for(int i=length-1; i>=0; i--)
{
System.Console.Write(name[i]);
}
}
}

Disclaimer: Copied without permission from The Daily Bite email.

thedailybyte.dev

My self Kapil Patel a software engineer with 8 years of experience. I am trying to solve this with whatever knowledge I have, also I will be improving my solution as I find better solutions from fellow engineers!

--

--

Must have for a back-end engineer

This is a partial list, I will keep updating it as I find

.NET background

C#
.Net Core
Web Api
Unit Test Framework (nUnit/xUnit)
SQL Server, CRUD operation
Cloud (Azure/Openshift/AWS/other cloud tech), if have hosting experience in one of these that’s fine
Microservices :- Good to have
Apache Kafka/Rabbit MQ or other message broker :- Good to have
DevOps (Azure DevOps/Jenkins/Bamboo/Octopus/any other CI/CD tools) and Unit-test integration in CI/CD pipeline :- Good to have

--

--