## Samsung Interview Question for Developer Program Engineers

Country: VN

Comment hidden because of low score. Click to expand.
0
of 0 vote

can you elaborate with an example

Comment hidden because of low score. Click to expand.
1
of 1 vote

or elaborate in english

Comment hidden because of low score. Click to expand.
0

Most probably he means in the increasing sequence as below:
between 100 and 145:
112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 125, 126, 127, 128
basically individual digits of a number in the increasing order but this is just a guess. However people interested can solve this :)

Comment hidden because of low score. Click to expand.
0
of 0 vote

int a,b,c,i=100;
while(i<=145)
{
a=i%10;
c=i/100;
b=(i-c*100-a)/10;
if(c>=b && b>=a)
print(i);
}

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````#include<iostream>
using namespace std;

int main()
{

int num1=100, num2=145;
//unit digit is num1%10, 10th digit is (num1/10)%10, 100th digit is num1/100
int digit1,digit10,digit100=1;
for(;num1<=num2;num1++)
{
digit1=num1%10;
digit10=(num1/10)%10;
if(digit10>digit100 && digit1>digit10)
cout<<num1<<"\t";
}
return 0;
}``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

public void PrintIncreaseDigit(int n1,int n2)
{
int d1, d10, d100 = 1;
for(;n1<=n2;n1++)
{
d1 = n1 % 10;
d10 = (n1 / 10) % 10;
if(d10>=d100 && d1 >=d10)
Console.WriteLine(n1);
}
}

Comment hidden because of low score. Click to expand.
0
of 0 vote

public void PrintIncreaseDigit(int n1,int n2)
{
if (n1 > n2)
return;
if ((n1 / 10) % 10 >= 1 && n1 % 10 >= (n1 / 10) % 10)
Console.WriteLine(n1);
PrintIncreaseDigit(n1 + 1, n2);
}

Comment hidden because of low score. Click to expand.
0
of 0 vote

Solution in C#

``````public static List<int> Numbers(int lower, int upper)
{
List<int> list = new List<int>();
//(lower < 10 ? 10 : lower) is done for ignoring digits
for (int i = lower < 10 ? 10 : lower; i <= upper; i++)
{
string str = i.ToString();
bool isOK = true;
for (int j = 0; j < str.Length - 1; j++)
{
if (str[j] >= str[j + 1])
{
isOK = false;
break;
}
}
if (isOK == true)
{
}
}
return list;
}``````

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.