saikat1239
BAN USER- 0 Answers Need help regarding php/zend interview next week
Hello everyone,
- saikat1239 August 05, 2015
I am looking for cpt ... I have an interview next week over phone regarding php/zend. Could anyone suggest what should I check must before interview. I am having 3 years experience in zend and 5 yrs in php.
Thanks ..| Flag | PURGE - 2 Answers Need Help for preparation
Hello Everyone,
- saikat1239 April 04, 2015
I need your help to prepare data structure and algorithm question. Can anyone suggest any book that easy to understand and would take less time to prepare? I am not much confident in Java. Please advise.
Thanks| Flag | PURGE
Hi Bro,
New in python...
I tried to write this code in other way ..
Please have a look....
def matchOrder(sample, main):
strArr = []
for i in sample:
strArr.append(i)
k=0;
counter = 0
j = 0
arrLength=len(strArr)
mainArrLength = len(main)
for eachVal in strArr:
for i in range(counter,mainArrLength):
if main[i] == strArr[k]:
k+=1
counter = j
j+=1
break
j+=1
if k == arrLength:
return "Same Order"
else:
return "Not Same Order"
print matchOrder('NAGARRO', 'abcNjhgAhGjhfhAljhRkhgRbhjbevfhO')
Python:-
Please tell me if we can improve written code
def sumRepetation(arr,n):
newArr=[]
count = 0
sumVal = 0
arrLength = len(arr)
reminderElement = arrLength % n
restElement = arrLength - reminderElement
counterVar = 0
flag = False
for i in arr:
if count<restElement and flag == False:
sumVal+=i
count+=1
if count == n and flag == False:
newArr.append(sumVal)
count = 0
sumVal = 0
counterVar+=1
if counterVar == restElement:
flag = True
if flag == True:
sumVal+=i
if counterVar == arrLength-1 and flag == True:
newArr.append(sumVal)
print newArr
passArr=[1,1,1,1,1,1,1,1,1,1,1,1,1,1]
number = 4
sumRepetation(passArr,number)
Python:
def compareSum(compArr):
listDic={}
listNegDic={}
for i in range(len(compArr)):
for j in range(len(compArr)):
if i == j:
continue
if(compArr[i]+compArr[j]==0):
if listDic.get(i) is None or listNegDic.get(i) is None:
if compArr[i]>0:
listDic[compArr[i]]= compArr[j]
if compArr[i]<0:
listNegDic[compArr[i]]=compArr[j]
return listDic
probArr = [2,1,-1,4,5,-2,-5,-4,7,8,-8]
print compareSum(probArr)
Thanks Bro. It helps me a lot ..!!!
I will try my best to follow your suggestion.
Python
Please let me know if anyone have other thoughts
- saikat1239 November 04, 2015